[
https://issues.apache.org/jira/browse/HIVE-11752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jesus Camacho Rodriguez updated HIVE-11752:
-------------------------------------------
Attachment: HIVE-11752.05.patch
[~jpullokkaran], new version of the patch addresses your concerns about CTEs
lifecycle: no collision with other temp tables in the same database, being able
to query correctly tables with the same name in other databases i.e. that those
tables are not shadowed by the CTE, and deleting the CTE data once the query
has executed.
Further, I had to review the logic to traverse the tasks tree and link tasks
generated by CTE/non-CTE to each other.
Finally, I added the additional CTE tests to MiniTez and MiniLLAP testsuite,
and everything is working fine.
> Pre-materializing complex CTE queries
> -------------------------------------
>
> Key: HIVE-11752
> URL: https://issues.apache.org/jira/browse/HIVE-11752
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 2.1.0
> Reporter: Navis
> Assignee: Jesus Camacho Rodriguez
> Priority: Minor
> Attachments: HIVE-11752.03.patch, HIVE-11752.04.patch,
> HIVE-11752.05.patch, HIVE-11752.1.patch.txt, HIVE-11752.2.patch.txt
>
>
> Currently, hive regards CTE clauses as a simple alias to the query block,
> which makes redundant works if it's used multiple times in a query. This
> introduces a reference threshold for pre-materializing the CTE clause as a
> volatile table (which is not exists in any form of metastore and just
> accessible from QB).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)