hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Da Cheng (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-21620) GROUPBY position alias not working with STREAMTABLE hint
Date Wed, 15 May 2019 23:15:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-21620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16840857#comment-16840857
] 

Da Cheng commented on HIVE-21620:
---------------------------------

Sorry to interrupt, can I ask who to talk to regarding this fix? 
Thanks! [~mmccline], [~dlavati], [~wzheng]

> GROUPBY position alias not working with STREAMTABLE hint
> --------------------------------------------------------
>
>                 Key: HIVE-21620
>                 URL: https://issues.apache.org/jira/browse/HIVE-21620
>             Project: Hive
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 2.3.2
>            Reporter: Da Cheng
>            Priority: Major
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> Hi team,
>   
>  When STREAMTABLE hint is used for JOINs, GROUPBY index fails to skip the hint to select
the right column. Take following query for example, I wanted to group by 'user', but the '1'
index in GROUPBY clause actually points to the hint '_/*+ STREAMTABLE(xyz) */_' other than
the actual 'user' column. Hence Hive errors out complaining: "Expression not in GROUP BY key
'user'"
> {code:java}
> select
>      /*+ STREAMTABLE(xyz) */
>      user,
>      sum(score)
>  from 
>      test.roster
>  group by 1{code}
> To make the query work, I need to manually skip the hint by using 'group by 2' instead
of 'group by 1'. 
>  (Note that the STREAMTABLE hint is dummy in the query since there is no JOIN. It's added
just to reproduce the error.)
>   
>  We have made a patch at our local branch and tested it's working fine. If you have
seen similar issues, feel free to apply our patch to your branch. Next we will create a PR
for the patch for review. Please advise if I missed anything.
>   
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message