Steve Carlin has uploaded a new patch set (#2). ( 
http://gerrit.cloudera.org:8080/23395 )

Change subject: IMPALA-13712: Enable constant folding using Impala executor
......................................................................

IMPALA-13712: Enable constant folding using Impala executor

This commit ensures that the Impala executor does the constant
folding that is needed at optimization time.

The main routine to do this is the ReduceExprShuttle. The shuttle
iterates through the RelNode tree and finds expressions in the Filter
and Project that can be folded.

A special interface was created to enable tests within the junit
framework, since it is preferable not to call any executor code
at junit time. The "reduce" method simply provides the reduction
on an expression that is known to be reduced.

One extra quirk: The cast function can return a null value in the
case where a the from/to cast combination is explictly allowed, but
based on the data, it returns null (e.g. a bad timestamp). So the
ImpalaCastFunction had to be changed to always allow nulls in its
return type.

Change-Id: I466dad3e83883089e7d79ca6078023efa5b9df2a
---
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCastFunction.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/util/ExprConjunctsConverter.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ReduceExprShuttle.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteJniFrontend.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
A 
java/calcite-planner/src/test/java/org/apache/impala/planner/TestReduceExprShuttle.java
7 files changed, 761 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/95/23395/2
--
To view, visit http://gerrit.cloudera.org:8080/23395
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I466dad3e83883089e7d79ca6078023efa5b9df2a
Gerrit-Change-Number: 23395
Gerrit-PatchSet: 2
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>

Reply via email to