[
https://issues.apache.org/jira/browse/PHOENIX-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maryann Xue updated PHOENIX-1580:
---------------------------------
Attachment: Phoenix-1580-v3.patch
[~ayingshu] Here's a patch with the select statement structure updated. You can
compare with your earlier patch and see that the difference is just a few lines
of code but the structure looks much better now. And also the method
ParseNodeFactory.select() has been reduced to only 4 lines. There is actually
no need to set any special flag for the outer query and none of these flags
would be used anyway, since as [~jamestaylor] said, things will all be taken
care of by sub-select compilation.
You can work from here and make other changes [~jamestaylor] has suggested.
Indenting at first, hopefully.
We should be able to support UNION ALL in subqueries, but it requires some
extra adjustment. I'll do that part.
You were arguing that ORDER-BY expressions should be compiled against the inner
query tableRef and in your case it worked that way. But it's interesting that
your test case for union with order-by contains only two rows of data, and the
result verification has nothing to do with the ordering, so I assume it would
work whatever way you implement it. You can't do wrong with such test cases. So
please do make sure that your test cases are sophisticated enough to reveal the
problems they should.
> 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-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)