You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Harish Butani <rh...@gmail.com> on 2013/10/23 22:46:02 UTC

Review Request 14887: Subquery support: disallow nesting of SubQueries

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14887/
-----------------------------------------------------------

Review request for hive and Ashutosh Chauhan.


Bugs: HIVE-5613
    https://issues.apache.org/jira/browse/HIVE-5613


Repository: hive-git


Description
-------

This is Restriction 9 from the SubQuery design doc:
We will not do algebraic transformations for these kinds of queries:

{noformat}
-query 1
select ...
from x
where  
    x.b in (select u 
            from y 
            where y.c = 10 and
                  exists (select m from z where z.A = x.C)
           )
- query 2
select ...
from x
where  
    x.b in (select u 
            from y 
            where y.c = 10 and
                  exists (select m from z where z.A = y.D)
{noformat}


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java 50b5a77 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 6fc3cd5 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SubQueryUtils.java 2d7775c 
  ql/src/test/queries/clientnegative/subquery_nested_subquery.q PRE-CREATION 
  ql/src/test/results/clientnegative/subquery_nested_subquery.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/14887/diff/


Testing
-------

tested subquery tests
added new subquery_nested_subquery.q negative test


Thanks,

Harish Butani


Re: Review Request 14887: Subquery support: disallow nesting of SubQueries

Posted by Harish Butani <rh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14887/
-----------------------------------------------------------

(Updated Oct. 29, 2013, 6:43 p.m.)


Review request for hive and Ashutosh Chauhan.


Changes
-------

fix -ve test subquery_subquery_chain.q
Add check when building SubQuery Object: SubQuery AST must not contain a child SubQuery AST


Bugs: HIVE-5613
    https://issues.apache.org/jira/browse/HIVE-5613


Repository: hive-git


Description
-------

This is Restriction 9 from the SubQuery design doc:
We will not do algebraic transformations for these kinds of queries:

{noformat}
-query 1
select ...
from x
where  
    x.b in (select u 
            from y 
            where y.c = 10 and
                  exists (select m from z where z.A = x.C)
           )
- query 2
select ...
from x
where  
    x.b in (select u 
            from y 
            where y.c = 10 and
                  exists (select m from z where z.A = y.D)
{noformat}


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java 50b5a77 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java cf0c895 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SubQueryUtils.java 2d7775c 
  ql/src/test/queries/clientnegative/subquery_nested_subquery.q PRE-CREATION 
  ql/src/test/results/clientnegative/subquery_nested_subquery.q.out PRE-CREATION 
  ql/src/test/results/clientnegative/subquery_subquery_chain.q.out 2eadfc3 

Diff: https://reviews.apache.org/r/14887/diff/


Testing
-------

tested subquery tests
added new subquery_nested_subquery.q negative test


Thanks,

Harish Butani


Re: Review Request 14887: Subquery support: disallow nesting of SubQueries

Posted by Ashutosh Chauhan <ha...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14887/#review27614
-----------------------------------------------------------

Ship it!


+1 Harish, can you attach the patch on jira so that Hive QA gets to run on it.

- Ashutosh Chauhan


On Oct. 23, 2013, 8:46 p.m., Harish Butani wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14887/
> -----------------------------------------------------------
> 
> (Updated Oct. 23, 2013, 8:46 p.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Bugs: HIVE-5613
>     https://issues.apache.org/jira/browse/HIVE-5613
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> This is Restriction 9 from the SubQuery design doc:
> We will not do algebraic transformations for these kinds of queries:
> 
> {noformat}
> -query 1
> select ...
> from x
> where  
>     x.b in (select u 
>             from y 
>             where y.c = 10 and
>                   exists (select m from z where z.A = x.C)
>            )
> - query 2
> select ...
> from x
> where  
>     x.b in (select u 
>             from y 
>             where y.c = 10 and
>                   exists (select m from z where z.A = y.D)
> {noformat}
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java 50b5a77 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 6fc3cd5 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SubQueryUtils.java 2d7775c 
>   ql/src/test/queries/clientnegative/subquery_nested_subquery.q PRE-CREATION 
>   ql/src/test/results/clientnegative/subquery_nested_subquery.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/14887/diff/
> 
> 
> Testing
> -------
> 
> tested subquery tests
> added new subquery_nested_subquery.q negative test
> 
> 
> Thanks,
> 
> Harish Butani
> 
>