You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Navis Ryu <na...@nexr.com> on 2015/02/24 02:10:58 UTC

Review Request 31335: Correlating expression cannot contain unqualified column references

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

Review request for hive.


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


Repository: hive-git


Description
-------

The following valid ISO-SQL constructs will not parse

Unsupported SubQuery Expression 'c1': Correlating expression cannot contain unqualified column references

The statement will parse if the predicate is changed to where tjoin1.c1 in ( ....)

select tjoin1.rnum, tjoin1.c1, tjoin1.c2 from tjoin1 where c1 in ( select c1 from tjoin1) 

select tjoin1.rnum, tjoin1.c1, tjoin1.c2 from tjoin1 where c1 in ( select tjoin1.c1 from tjoin1) 

select tjoin1.rnum, tjoin1.c1, tjoin1.c2 from tjoin1 where c1 in ( select x.c1 from tjoin1 x)


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/QBSubQuery.java 1b6b33b 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SubQueryUtils.java 57868b7 
  ql/src/test/queries/clientnegative/subquery_unqual_corr_expr.q 99ff9ca 
  ql/src/test/queries/clientpositive/subquery_unqual_corr_expr.q PRE-CREATION 
  ql/src/test/results/clientnegative/subquery_unqual_corr_expr.q.out f69a538 
  ql/src/test/results/clientpositive/subquery_unqual_corr_expr.q.out PRE-CREATION 

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


Testing
-------


Thanks,

Navis Ryu