hbutani/spark-druid-olap

Supporting next_day function for druid push down

sdesikan6 opened this issue · 0 comments

The following SQL needs to get pushed down to druid. Currently it does not.

SELECT v.campaign_name AS campaign_name,
sum(v.conversions) AS sum_conversions_ok,
sum(v.impressions) AS sum_impressions_ok,
cast(date_add(next_day(cast(v.date_string AS timestamp),'SU'),-7) AS timestamp) AS twk_date_string_ok
FROM (
SELECT *
FROM sparkline_viewability_2_4 ) v
WHERE (
v.advertiser_name = 'AMEX Personal Savings')
GROUP BY v.campaign_name,
cast(date_add(next_day(cast(v.date_string AS timestamp),'SU'),-7) AS timestamp)