-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more time grains #5083
Add more time grains #5083
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5083 +/- ##
==========================================
+ Coverage 77.53% 77.53% +<.01%
==========================================
Files 44 44
Lines 8710 8711 +1
==========================================
+ Hits 6753 6754 +1
Misses 1957 1957
Continue to review full report at Codecov.
|
@betodealmeida it seems like the Druid SQL spec is constantly evolving and it seems like |
superset/db_engine_specs.py
Outdated
@@ -1357,6 +1360,27 @@ class DruidEngineSpec(BaseEngineSpec): | |||
engine = 'druid' | |||
inner_joins = False | |||
|
|||
time_grains = ( | |||
Grain('Time Column', _('Time Column'), '{col}', None), | |||
Grain( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we make this a single line like the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter would then complain. :-/
But I'm changing the grains to use the FLOOR
function, and then this unit will go away.
@john-bodley, good catch — I'll update the PR to use |
* Add more time grains * Use FLOOR * Fix quotes for lint
* Add more time grains * Use FLOOR * Fix quotes for lint
* Add more time grains * Use FLOOR * Fix quotes for lint
This PR adds the "year" time grain to SQLite, and all the time grains supported by Druid SQL.