You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/05/27 15:46:54 UTC

[GitHub] [hive] kasakrisz opened a new pull request #2325: HIVE-25166: Query with multiple count(distinct) fails

kasakrisz opened a new pull request #2325:
URL: https://github.com/apache/hive/pull/2325


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   Add `GROUP__ID` virtual column to all Aggregate. `RelFieldTrimmer` will remove it if it is not projected.
   
   ### Why are the changes needed?
   Some queries having count(distinct) are rewritten to Group by a single grouping set and a case expression is projected using GroupId.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. Queries with multiple count(distinct) won't fail.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=groupby_grouping_id1.q,count_dist_1.q -pl itests/qtest -Pitests
   ```
   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] kasakrisz commented on pull request #2325: HIVE-25166: Query with multiple count(distinct) fails

Posted by GitBox <gi...@apache.org>.
kasakrisz commented on pull request #2325:
URL: https://github.com/apache/hive/pull/2325#issuecomment-851857576


   This is not the right approach now because it adds and extra column to shuffle which is not always necessary. 
   Closing this. See #2334 for fix the original issue.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] kasakrisz closed pull request #2325: HIVE-25166: Query with multiple count(distinct) fails

Posted by GitBox <gi...@apache.org>.
kasakrisz closed pull request #2325:
URL: https://github.com/apache/hive/pull/2325


   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org