[
https://issues.apache.org/jira/browse/HIVE-23356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098024#comment-17098024
]
Hive QA commented on HIVE-23356:
--------------------------------
Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/13001890/HIVE-23356.03.patch
{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.
{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 17165 tests
executed
*Failed tests:*
{noformat}
TestMiniLlapCliDriver - did not produce a TEST-*.xml file (likely timed out)
(batchId=49)
[intersect_all.q,unionDistinct_1.q,orc_ppd_schema_evol_3a.q,import_exported_table.q,tez_union_dynamic_partition.q,vector_offset_limit.q,orc_merge10.q,tez_union_dynamic_partition_2.q,temp_table_external.q,llap_udf.q,schemeAuthority.q,cte_2.q,rcfile_createas1.q,cttl.q,remote_script.q]
TestStatsReplicationScenariosACID - did not produce a TEST-*.xml file (likely
timed out) (batchId=183)
org.apache.hadoop.hive.ql.parse.TestReplicationScenariosExternalTables.org.apache.hadoop.hive.ql.parse.TestReplicationScenariosExternalTables
(batchId=189)
{noformat}
Test results:
https://builds.apache.org/job/PreCommit-HIVE-Build/22080/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/22080/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-22080/
Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 3 tests failed
{noformat}
This message is automatically generated.
ATTACHMENT ID: 13001890 - PreCommit-HIVE-Build
> Hash aggregation is always disabled while processing querys with grouping
> sets expressions.
> -------------------------------------------------------------------------------------------
>
> Key: HIVE-23356
> URL: https://issues.apache.org/jira/browse/HIVE-23356
> Project: Hive
> Issue Type: Bug
> Components: Hive, Operators, Query Processor
> Affects Versions: All Versions
> Reporter: Qiang.Kang
> Assignee: Qiang.Kang
> Priority: Critical
> Labels: performance
> Attachments: HIVE-23356.01.patch, HIVE-23356.02.patch,
> HIVE-23356.03.patch
>
>
> Hi, we find that many MapReduce map attempts disable hash aggregation while
> processing GroupBy Operator with grouping sets expressions. Logs are just
> like this:
> `Disable Hash Aggr: #hash table = 104427 #total = 100000 reduction = 1.0
> minReduction = 0.5`, which means hashTable size is even larger than the
> number of input rows.
> Dig deeper we can find that GroupBy operator disables hash aggregation just
> based on the number of input rows instead of rows actually processed. For
> GroupBy Operator with grouping sets (such as: roll up, cube, etc.),
> `numberRowsProcessed` equals `groupingSets.size()*numberRowsInput`, causing
> hashTableSize much larger than querys without grouping sets expressions.
> Let's consider a example below:
> - Query:
> SELECT col1, col2, MAX(col0) FROM tbl GROUP BY col1, col2 GROUPING SETS
> (col1,col2);
> - Input data:
> col0, col1, col2
> [0,-1,-1]
> [1,-1,-1]
> [2,-1,-1]
> [3,3,3]
> [4,4,4]
> - Configuration:
> hive.groupby.mapaggr.checkinterval = 1;
> minReductionHashAggr = 0.5;
> - Currently, there are 10 rows in partial aggregate result. (hash aggregation
> is disabled very early):
> [-1, null, 0]
> [null, -1, 0]
> [-1, null, 1]
> [null, -1, 1]
> [-1, null, 2]
> [null, -1, 2]
> [3, null, 3]
> [null, 3, 3]
> [4, null, 4]
> [null, 4, 4]
> The patch below disables hash aggregation based on the number of rows
> actually processed, reducing partial result entries a lot and improving the
> performance of aggregation. There are only 6 rows in partial aggregate result:
> [-1, null, 2]
> [null, -1, 2]
> [null, 3, 3]
> [4, null, 4]
> [null, 4, 4]
> [3, null, 3]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)