[
https://issues.apache.org/jira/browse/PHOENIX-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14387372#comment-14387372
]
Maryann Xue commented on PHOENIX-1580:
--------------------------------------
[~ayingshu] Two points:
1. The usage of MergeSortTopNResultIterator is totally wrong in your UnionPlan.
You shouldn't be doing copy and paste from ScanPlan. Instead, you should
instantiate only one instance of MergeSortTopNResultIterator to merge sort the
results returned by the ResultIterator of each sub-plan. You may need to write
an adapter class to wrap a list of sub-plan iterators as ResultIterators.
2. Expressions should always be compiled against its corresponding input schema
(i.e. PTable), and they can ALWAYS work correctly, no matter if the input
schema is a physical table or not. So you should make sure that the
orderByExpressions you pass into the MergeSortTopNResultIterator are compiled
against the temporary schema you use to compile projection.
> 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: PHOENIX-1580-grammar.patch, Phoenix-1580-v1.patch,
> phoenix-1580-v1-wipe.patch, phoenix-1580.patch, unionall-wipe.patch
>
>
> Select * from T1
> UNION ALL
> Select * from T2
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)