Steve Carlin has uploaded this change for review. ( 
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
---
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(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/46/21946/1
--
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: newchange
Gerrit-Change-Id: I2b4afc3ab1d17ba1f168904a6ded052e1d62b3fe
Gerrit-Change-Number: 21946
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <[email protected]>

Reply via email to