Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/21946 )
Change subject: IMPALA-13457: Calcite planner: fix datetime/interval issues for tpcds queries ...................................................................... IMPALA-13457: Calcite planner: fix datetime/interval issues for tpcds queries Added support for datetime interval operators. A dummy IntervalExpr was added to support logical to physical representation. The IntervalExpr is removed once the actual "+" operation for datetime is created, but the translation framework is simplified by working on the Calcite interval type in a separate temporary Expr. Some logic was inserted into CoerceOperandShuttle. This object is used to add casts when there is limitation in Calcite for number types. When we have an interval, we always want to represent it as a special type so we do not want to introduce a cast. Also, in ImpalaOperatorTable, the ability to use Impala functions over Calcite functions are needed because Calcite translates the year function into "extract" which causes some issues. Just using the Impala signature works for us here. Change-Id: I2b4afc3ab1d17ba1f168904a6ded052e1d62b3fe Reviewed-on: http://gerrit.cloudera.org:8080/21946 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M java/calcite-planner/src/main/java/org/apache/impala/calcite/coercenodes/CoerceOperandShuttle.java A java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/IntervalExpr.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexCallConverter.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaOperatorTable.java 4 files changed, 238 insertions(+), 9 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/21946 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2b4afc3ab1d17ba1f168904a6ded052e1d62b3fe Gerrit-Change-Number: 21946 Gerrit-PatchSet: 5 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Anonymous Coward (816) Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]>
