[ 
https://issues.apache.org/jira/browse/IMPALA-13531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18104835#comment-18104835
 ] 

ASF subversion and git services commented on IMPALA-13531:
----------------------------------------------------------

Commit a63bec3c816373a6244116f92f733385e2f8f6a3 in impala's branch 
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=a63bec3c8 ]

IMPALA-13531: Calcite CTE frontend

Support identifying CTEs in the Calcite planner for single-node plans.
CTE detection is based on HIVE-28259.

Adds new logical nodes Sequence, CTEProducer, and CTEConsumer, matching
constructs outlined in "Optimization of Common Table Expressions in MPP
Database Systems" by El-Helw et al. Implements them with physical
SequenceNode, CTEProducerNode, and CTEConsumerNode.

After optimization steps and before converting to Impala physical plan
nodes, runs a CTE program to identify CTE candidates and replace them
with ImpalaCTEConsumer nodes using VolcanoPlanner with materializations.
After materializing CTEs, identifies all CTEs from ImpalaCTEConsumers in
the plan tree and constructs a top-level ImpalaSequence containing the
plan tree and ImpalaCTEProducers to materialize CTE results for
consumers.

Adds cte_threshold query option to control when CTE replacement occurs.
CTE replacement will only occur when number of occurences exceeds the
threshold. Defaults to -1 so CTEs are disabled.

Adds cte_suggester_class command-line option to enable providing a
different Suggester implementation. Defaults to Calcite's
RelCommonExpressionBasicSuggester.

Adds basic explain tests.

Change-Id: Id0840c0859d2fe25628d799a18d302cee1eb36e8
Reviewed-on: http://gerrit.cloudera.org:8080/22091
Reviewed-by: Joe McDonnell <[email protected]>
Tested-by: Joe McDonnell <[email protected]>


> Implement CTE identification in Impala Calcite planner
> ------------------------------------------------------
>
>                 Key: IMPALA-13531
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13531
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Frontend
>            Reporter: Michael Smith
>            Assignee: Michael Smith
>            Priority: Major
>
> Port HIVE-28259 CTE identification to the Impala Calcite planner. That should 
> be sufficient to produce CTE PlanNodes in a single-node plan that we can 
> verify by reviewing the plan produced. Plan is not expected to be executable.
> Add query options to enable/disable CTEs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to