[ 
https://issues.apache.org/jira/browse/HIVE-24478?focusedWorklogId=545783&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-545783
 ]

ASF GitHub Bot logged work on HIVE-24478:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Feb/21 04:11
            Start Date: 02/Feb/21 04:11
    Worklog Time Spent: 10m 
      Work Description: kasakrisz merged pull request #1732:
URL: https://github.com/apache/hive/pull/1732


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 545783)
    Time Spent: 40m  (was: 0.5h)

> Subquery GroupBy with Distinct SemanticException: Invalid column reference
> --------------------------------------------------------------------------
>
>                 Key: HIVE-24478
>                 URL: https://issues.apache.org/jira/browse/HIVE-24478
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Panagiotis Garefalakis
>            Assignee: Panagiotis Garefalakis
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> {code:java}
> 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;
> {code}
> Issue:
> {code:java}
> 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)
> {code}
> Query runs fine when we include `nb_nsoc` in the Select expression



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to