This is an automated email from the ASF dual-hosted git repository. joemcdonnell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 4e6692b024b3e53afa0feae94b0def58e0ac8655 Author: Fang-Yu Rao <[email protected]> AuthorDate: Tue Nov 8 12:18:37 2022 -0800 IMPALA-11686: Fix test_corrupt_stat after IMPALA-11666 IMPALA-11666 revised the message in the query plans when there are potentially corrupt statistics, which broke test_corrupt_stat, an E2E test only run in the exhaustive tests. This patch fixes the test file accordingly. Testing: - Verified locally that the patch passes test_corrupt_stat. Change-Id: I817c7807a07bb89b93d795bce958b9872eff2eef Reviewed-on: http://gerrit.cloudera.org:8080/19224 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- .../java/org/apache/impala/planner/Planner.java | 4 +-- .../queries/QueryTest/corrupt-stats.test | 36 +++++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/fe/src/main/java/org/apache/impala/planner/Planner.java b/fe/src/main/java/org/apache/impala/planner/Planner.java index d34201156..9c9056206 100644 --- a/fe/src/main/java/org/apache/impala/planner/Planner.java +++ b/fe/src/main/java/org/apache/impala/planner/Planner.java @@ -334,8 +334,8 @@ public class Planner { "the partition(s) is positive.\n" + "The latter case does not necessarily imply the existence of corrupt \n" + "statistics when the corresponding tables are transactional.\n" + - "If it is suspected that there may be corrupt statistics, drop and \n" + - "re-compute statistics could resolve this problem.\n" + + "If it is suspected that there may be corrupt statistics, dropping and \n" + + "re-computing statistics could resolve this problem.\n" + Joiner.on(", ").join(tableNames) + "\n"); hasHeader = true; } diff --git a/testdata/workloads/functional-query/queries/QueryTest/corrupt-stats.test b/testdata/workloads/functional-query/queries/QueryTest/corrupt-stats.test index 6f2c69645..d365dfc71 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/corrupt-stats.test +++ b/testdata/workloads/functional-query/queries/QueryTest/corrupt-stats.test @@ -53,8 +53,13 @@ STRING, BIGINT, BIGINT, STRING, STRING, STRING, STRING, STRING, STRING ---- QUERY explain select count(*) from corrupted where org = 1; ---- RESULTS: VERIFY_IS_SUBSET -'WARNING: The following tables have potentially corrupt table statistics.' -'Drop and re-compute statistics to resolve this problem.' +'The row count in one or more partitions in the following tables ' +'is either a) less than -1, or b) 0 but the size of all the files inside ' +'the partition(s) is positive.' +'The latter case does not necessarily imply the existence of corrupt ' +'statistics when the corresponding tables are transactional.' +'If it is suspected that there may be corrupt statistics, dropping and ' +'re-computing statistics could resolve this problem.' '$DATABASE.corrupted' '' '03:AGGREGATE [FINALIZE]' @@ -132,8 +137,13 @@ STRING alter table corrupted partition(org=2) set tblproperties('numRows'='-1234', 'STATS_GENERATED_VIA_STATS_TASK'='true'); explain select count(*) from corrupted where org = 2; ---- RESULTS: VERIFY_IS_SUBSET -'WARNING: The following tables have potentially corrupt table statistics.' -'Drop and re-compute statistics to resolve this problem.' +'The row count in one or more partitions in the following tables ' +'is either a) less than -1, or b) 0 but the size of all the files inside ' +'the partition(s) is positive.' +'The latter case does not necessarily imply the existence of corrupt ' +'statistics when the corresponding tables are transactional.' +'If it is suspected that there may be corrupt statistics, dropping and ' +'re-computing statistics could resolve this problem.' '$DATABASE.corrupted' '' '03:AGGREGATE [FINALIZE]' @@ -192,8 +202,13 @@ BIGINT, BIGINT, STRING, STRING, STRING, STRING, STRING, STRING ---- QUERY explain select count(*) from corrupted_no_part; ---- RESULTS: VERIFY_IS_SUBSET -'WARNING: The following tables have potentially corrupt table statistics.' -'Drop and re-compute statistics to resolve this problem.' +'The row count in one or more partitions in the following tables ' +'is either a) less than -1, or b) 0 but the size of all the files inside ' +'the partition(s) is positive.' +'The latter case does not necessarily imply the existence of corrupt ' +'statistics when the corresponding tables are transactional.' +'If it is suspected that there may be corrupt statistics, dropping and ' +'re-computing statistics could resolve this problem.' '$DATABASE.corrupted_no_part' '' '03:AGGREGATE [FINALIZE]' @@ -215,8 +230,13 @@ STRING alter table corrupted_no_part set tblproperties('numRows'='-1234', 'STATS_GENERATED_VIA_STATS_TASK'='true'); explain select count(*) from corrupted_no_part; ---- RESULTS: VERIFY_IS_SUBSET -'WARNING: The following tables have potentially corrupt table statistics.' -'Drop and re-compute statistics to resolve this problem.' +'The row count in one or more partitions in the following tables ' +'is either a) less than -1, or b) 0 but the size of all the files inside ' +'the partition(s) is positive.' +'The latter case does not necessarily imply the existence of corrupt ' +'statistics when the corresponding tables are transactional.' +'If it is suspected that there may be corrupt statistics, dropping and ' +'re-computing statistics could resolve this problem.' '$DATABASE.corrupted_no_part' '' '03:AGGREGATE [FINALIZE]'
