Hello Aman Sinha, Joe McDonnell, Csaba Ringhofer, Michael Smith, Impala Public
Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/21211
to look at the new patch set (#17).
Change subject: IMPALA-12947: Implement Calcite Planner Union and Value RelNodes
......................................................................
IMPALA-12947: Implement Calcite Planner Union and Value RelNodes
This commit handles Union and Value RelNode operators
The Union RelNode is created within Calcite when there is a "union"
clause.
The Values RelNode is created when the lowest level does not come from
a table, but instead comes from constant values. For example, the query
"select 3" would create a Values RelNode with one literal value of 3.
The PlanNode creation simulates what already exists within the Impala planner.
There is no corresponding Values PlanNode. Instead, a Union is created with
the values expression serving as inputs expressions (hence the reason of
combining these 2 RelNodes in the same commit).
Other plan nodes used are the "SelectNode" and the "EmptySetNode". The
EmptySetNode is used where there are no rows coming from the value node.
While this cannot be simulated at this point, this will be needed when
we start introducing optimization rules, and will be tested when we turn
on the Impala test framework queries.
The SelectNode is used for functions that are applied on top of the UnionNode.
There is a major issue with this iteration of Union and Value nodes due
to a Calcite issue. Calcite currently treats all string literals as "CHAR"
type. This causes problems in the union operator if one tries to implement
the following query: "select 'a' union select 'ab'", since the 2 types in
the value clauses are CHAR(1) and CHAR(2) which do not match. This would
cause an exception on the server. A future commit will fix this issue.
Also of concern is that Calcite treats non-bigint constant as integers only.
That is, 3, 257, 65539 are all considered of type INT. This will also be
fixed in a later commit.
Change-Id: Ibd989dbb5cf0df0fcc88f72dd579ce4fd713f547
---
M fe/src/main/java/org/apache/impala/planner/SelectNode.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ConvertToImpalaRelRules.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaFilterRel.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaHdfsScanRel.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaPlanRel.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaProjectRel.java
A
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaUnionRel.java
A
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaValuesRel.java
A
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/NodeCreationUtils.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ParentPlanRelContext.java
A
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/phys/ImpalaUnionNode.java
A
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/util/TupleDescriptorFactory.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/CalcitePhysPlanCreator.java
M testdata/workloads/functional-query/queries/QueryTest/calcite.test
15 files changed, 611 insertions(+), 9 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/11/21211/17
--
To view, visit http://gerrit.cloudera.org:8080/21211
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibd989dbb5cf0df0fcc88f72dd579ce4fd713f547
Gerrit-Change-Number: 21211
Gerrit-PatchSet: 17
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>