[
https://issues.apache.org/jira/browse/HIVE-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13547772#comment-13547772
]
Ashutosh Chauhan commented on HIVE-3773:
----------------------------------------
Actually, HIVE-2206 won't optimize this query as it is if I am reading that
patch correctly. But, I think concept of having multiple pipeline of operators
in a single Map (or Reduce) task and tracking it via tag byte as introduced in
HIVE-2206 you will also have to implement (or some variant of it). I think its
worth looking at that patch to see if you can reuse the code from it. Worse
thing to have is a similar concept being implemented via two different
mechanisms for two different optimization scenarios.
> Share input scan by unions across multiple queries
> --------------------------------------------------
>
> Key: HIVE-3773
> URL: https://issues.apache.org/jira/browse/HIVE-3773
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Reporter: Namit Jain
> Assignee: Gang Tim Liu
>
> Consider a query like:
> select * from
> (
> select key, 1 as value, count(1) from src group by key
> union all
> select 1 as key, value, count(1) from src group by value
> union all
> select key, value, count(1) from src group by key, value
> ) s;
> src is scanned multiple times currently (one per sub-query).
> This should be treated like a multi-table insert by the optimizer.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira