[ https://issues.apache.org/jira/browse/HIVE-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901677#action_12901677 ]
John Sichi commented on HIVE-1586: ---------------------------------- Predicate pushdown already takes us half-way there, since we end up with this in the plan: Filter Operator predicate: expr: ('T1' = 'T2') The remaining work is to evaluate all-constant predicates and if false, replace the corresponding Filter with a dummy empty input (or propagate the emptiness further via relational algebra "zero" rules). > prune operators for empty inputs > -------------------------------- > > Key: HIVE-1586 > URL: https://issues.apache.org/jira/browse/HIVE-1586 > Project: Hadoop Hive > Issue Type: Improvement > Components: Query Processor > Affects Versions: 0.6.0 > Reporter: John Sichi > Assignee: John Sichi > Fix For: 0.7.0 > > > Given this: > create view v as > select * from ( > select *,'T1' as m from pokes > union all > select *,'T2' as m from pokes2) u; > select * from v > where m='T2'; > When we optimize the query, we can prune away all inputs to the union other > than the one which references pokes2. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.