[
https://issues.apache.org/jira/browse/PHOENIX-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317491#comment-14317491
]
Alicia Ying Shu edited comment on PHOENIX-1580 at 2/14/15 2:52 AM:
-------------------------------------------------------------------
[~jamestaylor] Thanks.
>Any particular reason you're not allowing LIMIT or ORDER BY? I think those
>should be allowed.
Oracle, Mysql and Postgresql do not allow LIMIT or ORDER BY in UNION selects.
We better follow the standard.
> The top level iterator from your QueryCompiler.compileUnionQuery() would be
> combined together in a ConcatResultIterator.
Existing ConcatResultIterator can not be applied to the result of
plan.iterator() which returns ResultIterator. ConcatResultIterator is a
low-level iterator requiring a list of PeekingResultIterators. I implemented my
own UnionConcatResultIterator to concat result iterators.
was (Author: aliciashu):
[~jamestaylor] Thanks.
>Any particular reason you're not allowing LIMIT or ORDER BY? I think those
>should be allowed.
Oracle, Mysql and Postgresql do not allow LIMIT or ORDER BY in UNION selects.
We better follow the standard.
> The top level iterator from your QueryCompiler.compileUnionQuery() would be
> combined together in a ConcatResultIterator.
ConcatResultIterator can not be applied to the result of plan.iterator() which
returns ResultIterator. ConcatResultIterator is a low-level iterator requiring
a list of PeekingResultIterators. That is why I changed PhoenixResultSet to get
the chained results back. Having a top-level ConcatResultIterator may not
directly applicable since the plan resultIterators can be anything such as
AggregatingResultIterator, SerialIterators that cannot be included in the
existing ConcatResultIterator.
> 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)