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

Review request for hive, Ashutosh Chauhan and John Pullokkaran.


Repository: hive-git


Description
-------

Hive CLI session:
{noformat}
hive> create table abc(foo int, bar string);
OK
Time taken: 0.633 seconds
hive> select foo as c0, count(*) as c1 from abc group by foo, bar having bar 
like '%abc%' order by foo;
FAILED: SemanticException [Error 10004]: Line 1:93 Invalid table alias or 
column reference 'foo': (possible column names are: c0, c1)
{noformat}
Without having clause, the query runs fine, example:
{code}
select foo as c0, count(*) as c1 from abc group by foo, bar order by foo;
{code}


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java e13356c 
  ql/src/java/org/apache/hadoop/hive/ql/parse/QBParseInfo.java 14a7e9c 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 3262887 
  ql/src/test/queries/clientnegative/alias_groupby_orderby.q PRE-CREATION 
  ql/src/test/queries/clientpositive/lineage3.q 70d4e57 
  ql/src/test/results/clientnegative/alias_groupby_orderby.q.out PRE-CREATION 
  ql/src/test/results/clientpositive/lineage3.q.out ad965c8 

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


Testing
-------


Thanks,

pengcheng xiong

Reply via email to