Stamatis Zampetakis created HIVE-28771:
------------------------------------------
Summary: Handle CTEs/HiveTableSpool when
hive.cbo.returnpath.hiveop is true
Key: HIVE-28771
URL: https://issues.apache.org/jira/browse/HIVE-28771
Project: Hive
Issue Type: Sub-task
Components: CBO
Reporter: Stamatis Zampetakis
Assignee: Stamatis Zampetakis
The HiveTableSpool operator (introduced by HIVE-28259) is used by the CBO to
represent common table expressions (CTEs). At the moment, the spool operator is
only handled in the ASTConverter.
The goal of this ticket is to handle the spool operator in HiveOpConverter to
allow using the [CTE rewritting
phase|https://github.com/apache/hive/blob/12966e7cd7e33ff71a0f860e1112e57af7993012/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L1752]
when hive.cbo.returnpath.hiveop is true.
This would allow going directly from a CBO plan with CTEs/spool to a Hive
(Operator) plan without the need to pass through the AST path which mandates
the materialization of the CTE in a temporary table.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)