Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # dev - Review Request 15525: HIVE-3107: Improve semantic analyzer to better handle column name references in group by/sort by clauses


Copy link to this message
-
Re: Review Request 15525: HIVE-3107: Improve semantic analyzer to better handle column name references in group by/sort by clauses
Harish Butani 2013-11-18, 04:05

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

(Updated Nov. 18, 2013, 4:05 a.m.)
Review request for hive, Ashutosh Chauhan and Xuefu Zhang.
Changes
-------

Allow an unaliased mapping and one aliased mapping in RowResolver get function.
Ran all failed tests with this change.
Bugs: hive-3107
    https://issues.apache.org/jira/browse/hive-3107
Repository: hive-git
Description
-------

Following queries all fail with various SemanticExceptions:
explain select t.c from t group by c;
explain select t.c from t group by c sort by t.c;
explain select t.c as c0 from t group by c0;
explain select t.c from t group by t.c sort by t.c;
Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/PTFTranslator.java 7a7f3ef
  ql/src/java/org/apache/hadoop/hive/ql/parse/RowResolver.java 908546e
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java d797407
  ql/src/test/queries/clientnegative/notable_alias3.q 6cc3e87
  ql/src/test/queries/clientpositive/groupby_resolution.q PRE-CREATION
  ql/src/test/queries/clientpositive/notable_alias3.q PRE-CREATION
  ql/src/test/results/clientnegative/notable_alias3.q.out cadca6e
  ql/src/test/results/clientpositive/groupby_resolution.q.out PRE-CREATION
  ql/src/test/results/clientpositive/notable_alias3.q.out PRE-CREATION
  ql/src/test/results/compiler/errors/nonkey_groupby.q.out a13d45d
  ql/src/test/results/compiler/plan/groupby1.q.xml 485c323
  ql/src/test/results/compiler/plan/groupby5.q.xml abdbff0

Diff: https://reviews.apache.org/r/15525/diff/
Testing
-------

added groupby_resolution.q that tests the jira listed.
Also added tests for having and windowing.
Thanks,

Harish Butani