hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashutosh Chauhan <hashut...@apache.org>
Subject Re: Review Request 39425: Invalid column ref error in order by when using column alias in select clause and using having
Date Wed, 04 May 2016 13:16:32 GMT

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




ql/src/test/queries/clientnegative/alias_groupby_orderby_1.q (line 1)
<https://reviews.apache.org/r/39425/#comment195698>

    This syntax is supported on MySQL,Postgres,Oracle & SQL Server.
    Any reason for disallowing this?



ql/src/test/queries/clientnegative/alias_groupby_orderby_2.q (line 2)
<https://reviews.apache.org/r/39425/#comment195699>

    This syntax is supported on MySQL and Postgres but throws error on Oracle & SQL Server.



ql/src/test/queries/clientpositive/lineage3.q (line 90)
<https://reviews.apache.org/r/39425/#comment195700>

    This will be backward incompat change?


- Ashutosh Chauhan


On May 2, 2016, 7:06 p.m., pengcheng xiong wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39425/
> -----------------------------------------------------------
> 
> (Updated May 2, 2016, 7:06 p.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> 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 8e00e0b 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/QBParseInfo.java 3a226e7 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 06db7f9 
>   ql/src/test/queries/clientnegative/alias_groupby_orderby_1.q PRE-CREATION 
>   ql/src/test/queries/clientnegative/alias_groupby_orderby_2.q PRE-CREATION 
>   ql/src/test/queries/clientnegative/cbo_alias_groupby_orderby_1.q PRE-CREATION 
>   ql/src/test/queries/clientnegative/cbo_alias_groupby_orderby_2.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/lineage3.q c907e21 
>   ql/src/test/results/clientnegative/alias_groupby_orderby_1.q.out PRE-CREATION 
>   ql/src/test/results/clientnegative/alias_groupby_orderby_2.q.out PRE-CREATION 
>   ql/src/test/results/clientnegative/cbo_alias_groupby_orderby_1.q.out PRE-CREATION 
>   ql/src/test/results/clientnegative/cbo_alias_groupby_orderby_2.q.out PRE-CREATION 
>   ql/src/test/results/clientpositive/lineage3.q.out 61acf52 
> 
> Diff: https://reviews.apache.org/r/39425/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> pengcheng xiong
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message