You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Marquis Wang <mw...@hmc.edu> on 2011/03/22 22:02:55 UTC
Bug in using columns with leading underscores in subqueries
Hi,
I believe I've found a bug in the semantic analyzer (or maybe something else?). It occurs when using a column with a leading underscore in a subquery.
> create table temp (`_col` int, key int);
> select key from temp;
> select `_col` from temp;
> select key from (select key from temp) t;
The above queries all work fine.
> select `_col` from (select `_col` from temp) t;
>
This query fails with "FAILED: Error in semantic analysis: line 1:7 Invalid Table Alias or Column Reference `_col`"
The following query works in lieu of the above.
> select col as `_col` from (select `_col` as col from temp) t;
>
Thanks,
Marquis Wang
HMC Computer Science '11