Skip to content
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

SQL: Add context and contextual functions to planner. #3919

Merged
merged 4 commits into from
Feb 15, 2017

Conversation

gianm
Copy link
Contributor

@gianm gianm commented Feb 9, 2017

Added support for context parameters specified as JDBC connection properties
or a JSON object for SQL-over-JSON-over-HTTP.

Also added features that depend on context functionality:

  • Added CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP functions.
  • Added support for time zones other than UTC via a "timeZone" context.
  • Pass down query context to Druid queries too.

Also some bug fixes:

  • Fix DATE handling, it was largely done incorrectly before.
  • Fix CAST(__time TO DATE) which should do a floor-to-day.
  • Fix non-equality comparisons to FLOOR(__time TO X).
  • Fix maxQueryCount property.

@gianm gianm added the Feature label Feb 9, 2017
@gianm gianm added this to the 0.10.0 milestone Feb 9, 2017
@gianm gianm assigned fjy and jon-wei Feb 9, 2017
@gianm
Copy link
Contributor Author

gianm commented Feb 9, 2017

This probably could be broken up into two smaller PRs (1- context, 2- time related stuff), but I did it as one since I ended up developing a few related things and their tests together (context ability + current_timestamp function + timezone stuff + DATE fixes).

@gianm gianm force-pushed the sql-context-and-time-stuff branch from 3861c88 to 6c64814 Compare February 9, 2017 00:57
Added support for context parameters specified as JDBC connection properties
or a JSON object for SQL-over-JSON-over-HTTP.

Also added features that depend on context functionality:

- Added CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP functions.
- Added support for time zones other than UTC via a "timeZone" context.
- Pass down query context to Druid queries too.

Also some bug fixes:

- Fix DATE handling, it was largely done incorrectly before.
- Fix CAST(__time TO DATE) which should do a floor-to-day.
- Fix non-equality comparisons to FLOOR(__time TO X).
- Fix maxQueryCount property.
@gianm gianm force-pushed the sql-context-and-time-stuff branch from 6c64814 to a461c12 Compare February 9, 2017 02:46
@gianm
Copy link
Contributor Author

gianm commented Feb 9, 2017

Merged with master to pick up changes from #3838.

@gianm gianm closed this Feb 9, 2017
@gianm gianm reopened this Feb 9, 2017
@fjy
Copy link
Contributor

fjy commented Feb 13, 2017

👍

@jon-wei
Copy link
Contributor

jon-wei commented Feb 15, 2017

looks good so far, will take another look after conflict fix

@gianm
Copy link
Contributor Author

gianm commented Feb 15, 2017

thx for the review @jon-wei, pushed a fix for conflicts.

@jon-wei jon-wei closed this Feb 15, 2017
@jon-wei jon-wei reopened this Feb 15, 2017
@jon-wei
Copy link
Contributor

jon-wei commented Feb 15, 2017

👍

@jon-wei jon-wei merged commit 16ef513 into apache:master Feb 15, 2017
@gianm gianm deleted the sql-context-and-time-stuff branch September 23, 2022 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants