Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Add partition and macros support at raw sql mode #276

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

LiorRacer
Copy link
Contributor

@LiorRacer LiorRacer commented Aug 30, 2020

What this PR does / why we need it:
Support for partition table and macros for raw sql
An example:

SELECT sum(int64_field_0) as metric, TIMESTAMP(date_field_1) as time
FROM `projectId.Lior.movies`
WHERE $__timeFilter(date_field_1) 
group by date_field_1
LIMIT 1000

Will translate to

SELECT sum(int64_field_0) as metric, TIMESTAMP(date_field_1) as time
FROM `projectId.Lior.movies`
where _PARTITIONTIME >= '2020-03-31 21:00:00' AND _PARTITIONTIME < '2020-05-26 20:59:59' AND  `date_field_1` BETWEEN '2020-03-31' AND '2020-05-26' 
group by date_field_1
LIMIT 1000

Which issue(s) this PR fixes:

Fixes #
#269
#262
Special notes for your reviewer:

Release note:


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants