You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Alicia Ying Shu (JIRA)" <ji...@apache.org> on 2015/02/12 19:23:11 UTC

[jira] [Comment Edited] (PHOENIX-1580) Support UNION ALL

    [ 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/12/15 6:22 PM:
-------------------------------------------------------------------

[~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 requires PeekingResultIterator. 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.




was (Author: aliciashu):
[~jamestaylor] 
>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 requires PeekingResultIterator. 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)