Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16712 )
Change subject: IMPALA-7876: COMPUTE STATS TABLESAMPLE is not updating number of estimated rows ...................................................................... IMPALA-7876: COMPUTE STATS TABLESAMPLE is not updating number of estimated rows 'COMPUTE STATS TABLESAMPLE' uses a child query with following function 'ROUND(COUNT(*) / <effective_sample_perc>)' for computing the row count. The 'ROUND()' fn returns the row count as a DECIMAL type. The 'CatalogOpExecutor' (CatalogOpExecutor::SetTableStats) expects the row count as a BIGINT type. Due to this data type mismatch the table stats (Extrap #Rows) doesn't get set. Adding an explicit CAST to BIGINT for the ROUND function results in the table stats (Extrap #Rows) getting set properly. Fixed both 'custom_cluster/test_stats_extrapolation.py' and 'metadata/test_stats_extrapolation.py' so that they can catch issues like this, where table stats are not set when using 'COMPUTE STATS TABLESAMPLE'. Testing: - Ran core tests. Change-Id: I88a0a777c2be9cc18b3ff293cf1c06fb499ca052 Reviewed-on: http://gerrit.cloudera.org:8080/16712 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java M tests/common/impala_test_suite.py M tests/custom_cluster/test_stats_extrapolation.py M tests/metadata/test_stats_extrapolation.py 4 files changed, 27 insertions(+), 9 deletions(-) Approvals: Tim Armstrong: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/16712 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I88a0a777c2be9cc18b3ff293cf1c06fb499ca052 Gerrit-Change-Number: 16712 Gerrit-PatchSet: 6 Gerrit-Owner: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
