Skip to content
Vitalii Diravka edited this page Aug 30, 2021 · 6 revisions

Drill-specific commits in Apache Calcite

Currently, Drill uses Apache Calcite with additional changes, required for Drill. All the commits were left after update from Calcite 1.4.0 to Calcite 1.15.0 (3 commits) and from Calcite 1.18.0 to Calcite 1.20.0 (1 commit) and weren't merged to the Calcite's master yet since there is no consensus on them in Calcite community.

List of Jiras with Drill-specific commits:

Jira Summary The reason why it wasn't merged
CALCITE-2087 Add new method to ViewExpander interface to allow passing SchemaPlus. Pull request into Apache Calcite was created, but it was declined. See conversation in Jira.
CALCITE-3121 VolcanoPlanner hangs due to removing ORDER BY from sub-query Pull request was open to revert changes (PR-1264) which remove ORDER BY clause; it wasn't merged, because aforementioned changes only unveiled the issue and no proper solution is available yet.

Specific commit links

Commits to cherry-pick on top of new released Calcite before building a version for Drill:

  • CALCITE-3121 Revert "[CALCITE-2798] Remove ORDER BY in sub-query, provided it has no LIMIT or OFFSET, during SQL-to-RelNode conversion
  • Drill-specific changes : added a general class for Date/Time/Timestamp literals (TimestampString, DateString, TimeString) to avoid class cast exceptions.
  • CALCITE-2087 Add new method to ViewExpander interface to allow passing SchemaPlus

Drill-Calcite repository

Repository with source code is placed here. For backward compatibility, a couple of previous Drill Calcite branches were pushed into this repo.

Drill committers who need write permissions to the repository, should notify its owner.

Process of updating Calcite version

  • Push required changes to the existing branch, or create new branch. Though this repository contains Drill specific commits, it is forbidden to add additional specific commits which were not merged to Apache Calcite master if it wasn't discussed in Drill community first.
  • The last commit must be a commit that updates the version number. An example command is mvn versions:set -DgenerateBackupPoms=false -DnewVersion=<NEW_VERSION>. Commit and push it to the fork.
  • Create and push tag for commit with the version update (git tag <tag_name> && git push upstream <tag_name>). Tag name should match the version, for example, 1.18.0-drill-r0, 1.18.0-drill-r1, 1.18.0-drill-r2 and so on. You are able to create release and tag from the GitHub via Releases and then Draft a new release.
  • Submit a build in the JitPack: https://jitpack.io/#vvysotskyi/drill-calcite
  • Bump-up Drill Calcite version in Drill pom.xml file.