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

Maryann Xue commented on PHOENIX-1580:
--------------------------------------

[~aliciashu], I should have made it clearer. By wrapping the original QueryPlan 
with an additional TupleProjectionPlan, the dependence on the aggregators 
introduced by the original RowProjector will be moved to the 
TupleProjectionPlan layer. And as a result you will have to create a new 
RowProjector, a single one for both side of the query. This RowProjector 
basically contains ColumnProjectors with ProjectedColumnExpressions.  It's 
almost like for columnProjectors[0], its corresponding expression would be 
ProjectedColumnExpression(0, ...). 
One thing that is required to instantiate a ProjectedColumnExpression is a 
temporary PTable instance. The way you'll have to create this PTable instance 
is very similar to how we handle Derived Tables. Again, please refer to 
QueryCompiler.compileSingleQuery(), in which we use the inner query 
RowProjector to construct a temporary schema (PTable instance) for the outer 
query compilation. The actual creation code resides in FromCompiler. For 
derived tables we have two phases for this temp schema creation, since at the 
beginning we do not have type information yet. But in your case, it would be 
simpler, you can do it all at once.  


> Support UNION ALL
> -----------------
>
>                 Key: PHOENIX-1580
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1580
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Alicia Ying Shu
>            Assignee: Alicia Ying Shu
>         Attachments: unionall-wipe.patch
>
>
> Select * from T1
> UNION ALL
> Select * from T2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to