[ 
https://issues.apache.org/jira/browse/PHOENIX-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14395126#comment-14395126
 ] 

Alicia Ying Shu edited comment on PHOENIX-1580 at 4/3/15 10:14 PM:
-------------------------------------------------------------------

[~jamestaylor], [~maryannxue] Here are the changes I have made, let me know 
whether they are ok. Then I will submit a patch

1. Need to check Null otherwise NPE for Order By queries, etc.
    public UnionResultIterators(List<QueryPlan> plans) throws SQLException {
      ....
          splits.addAll(plan.getSplits()); 
            if (plan.getScans() != null)
                scans.addAll(plan.getScans());
        }
    }
2. In UnionAllIT.java
  public void testUnionAllInSubquery() throws Exception {
...
}  catch (SQLFeatureNotSupportedException e) {
        } 

    public void testUnionAllInSubqueryDerived() throws Exception {
....} catch (SQLException e) { // did not throw SQLFeatureNotSupportedException 
here after Manyann's patch
        }
3.  Keep Explain plan as it is for now. Fix explain issues with PHOENIX-1808 
4. Have tests that query with only LIMIT and query with no LIMIT and no ORDER 
BY. All with data.
5. ran "mvn clean install  " before. All tests passed.
6. Already incorporated Manyann's  comments. In my current patch incorporated 
Subquery checks instead of previous' changes in ParseNodeFactory. That is why 
Subquery throws different exception now.


was (Author: aliciashu):
[~jamestaylor], [~maryannxue] Here are the changes I have made, let me know 
whether they are ok. Then I will submit a patch

1. Need to check Null otherwise NPE for Order By queries, etc.
    public UnionResultIterators(List<QueryPlan> plans) throws SQLException {
      ....
          splits.addAll(plan.getSplits()); 
            if (plan.getScans() != null)
                scans.addAll(plan.getScans());
        }
    }
2. In UnionAllIT.java
  public void testUnionAllInSubquery() throws Exception {
...
}  catch (SQLFeatureNotSupportedException e) {
        } 

    public void testUnionAllInSubqueryDerived() throws Exception {
....} catch (SQLException e) { // did not throw SQLFeatureNotSupportedException 
here after Manyann's patch
        }
3.  Keep Explain plan as it is for now. Fix explain issues with PHOENIX-1808 
4. Have tests that query with only LIMIT and query with no LIMIT and no ORDER 
BY. All with data.
5. ran "mvn clean install  " before. All tests passed.
6. Already incorporated Manyann's  comments in v8 patch. Maryann please let me 
know if it is not the case.

> Support UNION ALL
> -----------------
>
>                 Key: PHOENIX-1580
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1580
>             Project: Phoenix
>          Issue Type: Improvement
>            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-v7.patch, 
> Phoenix-1580-v8.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)

Reply via email to