Steve Carlin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/22103


Change subject: IMPALA-13520: Support in clause coercing
......................................................................

IMPALA-13520: Support in clause coercing

Calcite has special processing for any in clause. It has a callback
function that allows all the parameters to be coerced into its proper
type. While we do have a mechanism to do coercion, it only handles
functions, and the in clause is handled specially within Calcite.

So we use the Calcite mechanism to derive a common Impala type and
coerce all the parameters.

The CombineValueNodesRule is also needed for this change. There is a
test case in test_exprs.test where an in clause contains 10,000
params in side the IN clause (e.g. int_col IN (1, 2, 3, ..., 10000).
In this case, Calcite creates 10,000 Values RelNodes which takes way
too long to process on the execution side. The rule combines all
the Values RelNodes into one Values RelNode with many tuples, which
Impala handles quickly when converted into the physical Impala
PlanNode.

Change-Id: I310d3d8deb489e097dd58ef8f8bc63aefe118051
---
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/CombineValueNodesRule.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteValidator.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeCoercionFactory.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeCoercionImpl.java
5 files changed, 259 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/03/22103/3
--
To view, visit http://gerrit.cloudera.org:8080/22103
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I310d3d8deb489e097dd58ef8f8bc63aefe118051
Gerrit-Change-Number: 22103
Gerrit-PatchSet: 3
Gerrit-Owner: Steve Carlin <scar...@cloudera.com>

Reply via email to