Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
CREATE TABLE tmp_src1( `npp` string, `nsoc` string) stored as orc; INSERT INTO tmp_src1 (npp,nsoc) VALUES ('1-1000CG61', '7273111'); SELECT `min_nsoc` FROM (SELECT `npp`, MIN(`nsoc`) AS `min_nsoc`, COUNT(DISTINCT `nsoc`) AS `nb_nsoc` FROM tmp_src1 GROUP BY `npp`) `a` WHERE `nb_nsoc` > 0;
Issue:
org.apache.hadoop.hive.ql.parse.SemanticException: Line 0:-1 Invalid column reference 'nsoc' at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanGroupByOperator1(SemanticAnalyzer.java:5405)
Query runs fine when we include `nb_nsoc` in the Select expression
Attachments
Issue Links
- is related to
-
HIVE-22335 CBO throws Invalid column reference exception
- Open
- links to