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

David Lavati commented on HIVE-21620:
-------------------------------------

Hi [~dac], 
thank you for your investigation, you can find more info on the process here: 
https://cwiki.apache.org/confluence/display/Hive/HowToContribute

I'm not yet familiar with this part of the code base, but I can give some 
further notes on contributing:
 * We have a green run policy for new commits, which means you need to submit 
your patch in this Jira and an automation will check your code. The patch has 
to bee iterated until all tests pass in the precommit job. (Note here, that 
some tests tend to be flaky, so multiple resubmits of the same patch is 
possible, if the failed tests are unrelated.) See [Creating a 
patch|https://cwiki.apache.org/confluence/display/Hive/HowToContribute#HowToContribute-CreatingaPatch]
 and [Contributing your 
work|https://cwiki.apache.org/confluence/display/Hive/HowToContribute#HowToContribute-ContributingYourWork]
 * Is this resolved in the current Hive version? If this is unique to Hive 2.x 
only, you'll need to submit your patch here for *branch-2*
 * Can you recreate the issue with a few SQL commands from scratch? Adding a 
unit test for previously bad behaviour is advised. You can find more info at 
[Query Unit 
Test|https://cwiki.apache.org/confluence/display/Hive/HowToContribute#HowToContribute-QueryUnitTest]

 

Cheers,
David

> 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)

Reply via email to