hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-19097) related equals and in operators may cause inaccurate stats estimations
Date Thu, 14 Jun 2018 22:08:00 GMT

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

Hive QA commented on HIVE-19097:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12927667/HIVE-19097.02.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 92 failed/errored test(s), 14523 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[cbo_rp_simple_select] (batchId=48)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[cbo_simple_select] (batchId=18)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[constant_prop_3] (batchId=45)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[druid_basic3] (batchId=63)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[druid_intervals] (batchId=24)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[filter_cond_pushdown] (batchId=63)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[remove_exprs_stats] (batchId=91)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[stat_estimate_related_col] (batchId=42)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vector_date_1] (batchId=22)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vector_mr_diff_schema_alias] (batchId=67)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vector_non_constant_in_expr] (batchId=79)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vectorized_timestamp] (batchId=81)
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[dynamic_partition_pruning_2]
(batchId=151)
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[explainuser_2] (batchId=152)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[bucketpruning1] (batchId=176)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[cbo_simple_select] (batchId=158)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[cross_prod_1] (batchId=172)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_between_in] (batchId=168)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_date_1] (batchId=158)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_mr_diff_schema_alias]
(batchId=170)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_string_decimal]
(batchId=154)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vectorized_dynamic_semijoin_reduction]
(batchId=155)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vectorized_timestamp]
(batchId=173)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_dynamic_partition_pruning_2]
(batchId=185)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[cbo_simple_select] (batchId=115)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[vector_between_in] (batchId=133)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query10] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query12] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query13] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query15] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query16] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query17] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query18] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query20] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query23] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query27] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query29] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query34] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query36] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query37] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query45] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query46] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query48] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query53] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query56] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query63] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query66] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query68] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query69] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query73] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query74] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query79] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query82] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query83] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query85] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query89] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query8] (batchId=258)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query98] (batchId=258)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query10] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query12] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query13] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query15] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query16] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query17] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query18] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query20] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query23] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query27] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query29] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query34] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query36] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query37] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query45] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query46] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query48] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query53] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query56] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query63] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query64] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query66] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query68] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query69] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query73] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query74] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query79] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query82] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query83] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query85] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query89] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query8] (batchId=256)
org.apache.hadoop.hive.cli.TestTezPerfCliDriver.testCliDriver[query98] (batchId=256)
org.apache.hadoop.hive.ql.plan.mapping.TestStatEstimations.testFilterIntIn (batchId=302)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/11787/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/11787/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-11787/

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: 92 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12927667 - PreCommit-HIVE-Build

> related equals and in operators may cause inaccurate stats estimations
> ----------------------------------------------------------------------
>
>                 Key: HIVE-19097
>                 URL: https://issues.apache.org/jira/browse/HIVE-19097
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>         Attachments: HIVE-19097.01.patch, HIVE-19097.02.patch, HIVE-19097.partial.patch
>
>
> tpcds#74 is optimized in a way that for date_dim the condition contains IN and = for
the same column
> {code:java}
> |             Map Operator Tree:                     |
> |                 TableScan                          |
> |                   alias: date_dim                  |
> |                   filterExpr: (((d_year) IN (2001, 2002) and (d_year = 2002) and d_date_sk
is not null) or ((d_year) IN (2001, 2002) and (d_year = 2001) and d_date_sk is not null))
(type: boolean) |
> |                   Statistics: Num rows: 73049 Data size: 876588 Basic stats: COMPLETE
Column stats: COMPLETE |
> |                   Filter Operator                  |
> |                     predicate: ((d_year) IN (2001, 2002) and (d_year = 2002) and d_date_sk
is not null) (type: boolean) |
> |                     Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column
stats: COMPLETE |
> {code}
> the "real" row count will be 365
> for separate {{IN}} and {{=}} the estimation is very good; but if both are present it
becomes (very) underestimated.
> {code:java}
> set hive.query.results.cache.enabled=false;
> drop table if exists t1;
> drop table if exists t8;
> create table t1 (a integer,b integer);
> create table t8 like t1;
> insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5);
> insert into t8
> select * from t1 union all select * from t1 union all select * from t1 union all select
* from t1 union all
> select * from t1 union all select * from t1 union all select * from t1 union all select
* from t1
> ;
> analyze table t1 compute statistics for columns;
> analyze table t8 compute statistics for columns;
> explain analyze select sum(a) from t8 where b in (2,3) group by b;
> explain analyze select sum(a) from t8 where b=2 group by b;
> explain analyze select sum(a) from t1 where b in (2,3) and b=2 group by b;
> explain analyze select sum(a) from t8 where b in (2,3) and b=2 group by b;
> {code}



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

Mime
View raw message