You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Mustafa Iman (Jira)" <ji...@apache.org> on 2020/10/06 20:20:00 UTC

[jira] [Commented] (HIVE-24234) Improve checkHashModeEfficiency in VectorGroupByOperator

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

Mustafa Iman commented on HIVE-24234:
-------------------------------------

[~rajesh.balamohan]

Change makes sense to me. One thing I want to clarify is definition of hive.map.aggr.hash.min.reduction config option. Its definition is the following

HIVEMAPAGGRHASHMINREDUCTION("hive.map.aggr.hash.min.reduction", (float) 0.99,
 "Hash aggregation will be turned off if the ratio between hash table size and input rows is bigger than this number. \n" +
 "Set to 1 to make sure hash aggregation is never turned off."),

With new code, setting this value to 1 does not guarantee hash aggregation is never turned off. (outputRecords) / (inputRecords * 1.0f) can be larger than 1 when grouping sets are present. Can you update the description of the config option accordingly?

> Improve checkHashModeEfficiency in VectorGroupByOperator
> --------------------------------------------------------
>
>                 Key: HIVE-24234
>                 URL: https://issues.apache.org/jira/browse/HIVE-24234
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Rajesh Balamohan
>            Priority: Major
>         Attachments: HIVE-24234.wip.patch
>
>
> Currently, {{VectorGroupByOperator::checkHashModeEfficiency}} compares the number of entries with the number input records that have been processed. For grouping sets, it accounts for grouping set length as well.
> Issue is that, the condition becomes invalid after processing large number of input records. This prevents the system from switching over to streaming mode. 
> e.g Assume 500,000 input records processed, with 9 grouping sets, with 100,000 entries in hashtable. Hashtable would never cross 4,500,0000 entries as the max size itself is 1M by default. 
> It would be good to compare the input records (adjusted for grouping sets) with number of output records (along with size of hashtable size) to determine hashing or streaming mode.
> E.g Q67.



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