[
https://issues.apache.org/jira/browse/IMPALA-12947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874061#comment-17874061
]
ASF subversion and git services commented on IMPALA-12947:
----------------------------------------------------------
Commit b028da18c926efacac11c466d316dc64656dd689 in impala's branch
refs/heads/master from Steve Carlin
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=b028da18c ]
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
Reviewed-on: http://gerrit.cloudera.org:8080/21211
Reviewed-by: Joe McDonnell <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Implement Values and Union Calcite RelNodes
> -------------------------------------------
>
> Key: IMPALA-12947
> URL: https://issues.apache.org/jira/browse/IMPALA-12947
> Project: IMPALA
> Issue Type: Sub-task
> Reporter: Steve Carlin
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]