Skip to content

Upgrade to Calcite 1.15.0 - #5210

Merged
jon-wei merged 2 commits into
apache:masterfrom
jon-wei:calcite15
Jan 4, 2018
Merged

Upgrade to Calcite 1.15.0#5210
jon-wei merged 2 commits into
apache:masterfrom
jon-wei:calcite15

Conversation

@jon-wei

@jon-wei jon-wei commented Jan 4, 2018

Copy link
Copy Markdown
Contributor

This PR upgrades Calcite to 1.15.0, which fixes #4635 and #4945, with corresponding unit tests.

Calcite 1.15.0 changed the way it handles EXTRACT(EPOCH ...), so this patch updates Druid accordingly.

The PR also changes Druid's EPOCH units from milliseconds to seconds, which is more standard, e.g.:
https://www.postgresql.org/docs/9.1/static/functions-datetime.html
https://www.ibm.com/support/knowledgecenter/en/SSULQD_7.2.1/com.ibm.nz.dbu.doc/r_dbuser_functions_expressions_extract_datetime.html

The PR also re-enables/updates unit tests that were affected by https://issues.apache.org/jira/browse/CALCITE-1601 (fixed in Calcite 1.12.0, but the Druid tests were not enabled)

@jon-wei jon-wei added this to the 0.12.0 milestone Jan 4, 2018

@gianm gianm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with minor suggestion in the tests.

Druids.newTimeseriesQueryBuilder()
.dataSource(CalciteTests.DATASOURCE1)
.intervals(QSS(Intervals.of("2000/P1M")))
.intervals(QSS(Intervals.of("-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z")))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be better as .intervals(QSS(Filtration.eternity()))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, changed to Filtration.eternity()

@jon-wei
jon-wei merged commit 935ac64 into apache:master Jan 4, 2018
jon-wei added a commit to jon-wei/druid that referenced this pull request Jan 4, 2018
* Upgrade to Calcite 1.15.0

* Use Filtration.eternity()
jon-wei added a commit that referenced this pull request Jan 4, 2018
* Upgrade to Calcite 1.15.0

* Use Filtration.eternity()
@himanshug

himanshug commented Jan 5, 2018

Copy link
Copy Markdown
Contributor

@jon-wei it appears that calcite-core is now bringing memory-0.9.0.jar which is conflicting with memory-0.10.3.jar brought by datasketches module.
can we make them both use same version?

@jon-wei

jon-wei commented Jan 5, 2018

Copy link
Copy Markdown
Contributor Author

@himanshug I opened a PR that excludes sketches-core from calcite here: #5223

riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
* Upgrade to Calcite 1.15.0

* Use Filtration.eternity()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQL: NPE on filtered aggregation with "NOT IN"

3 participants