[
https://issues.apache.org/jira/browse/PHOENIX-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14393626#comment-14393626
]
James Taylor commented on PHOENIX-1580:
---------------------------------------
I see - yes that's not right. Put that in the iterators(List<? extends
SQLCloseable>) method instead, like this:
{code}
+ public final ResultIterator iterator(final List<? extends SQLCloseable>
dependencies) throws SQLException {
+ this.iterators = new UnionResultIterators(plans);
+ ResultIterator scanner;
+ boolean isOrdered = (orderBy != null) &&
!orderBy.getOrderByExpressions().isEmpty();
+
+ if (isOrdered) { // TopN
+ scanner = new MergeSortTopNResultIterator(iterators, limit,
orderBy.getOrderByExpressions());
+ } else {
+ scanner =
ConcatResultIterator.newIterator(iterators.getIterators());
+ if (limit != null) {
+ scanner = new LimitingResultIterator(scanner, limit);
+ }
+ }
+ return scanner;
+ }
{code}
> 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-v2.patch, Phoenix-1580-v3.patch, Phoenix-1580-v4.patch,
> Phoenix-1580-v5.patch, Phoenix-1580-v6.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)