Arnab Karmakar has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24733
Change subject: IMPALA-14996: Optimize count(*) for Iceberg V3 DV-only tables ...................................................................... IMPALA-14996: Optimize count(*) for Iceberg V3 DV-only tables Enable compile-time count(*) optimization for Iceberg V3 tables that exclusively use Deletion Vectors. Similar to V1 tables, the count is computed as count(data records) - count(delete entries) without runtime scanning. Key changes: - Refactored SelectStmt to consolidate V1 and DV-only V3 constant count rewrites into optimizePlainCountStarQueryConstant - Renamed transformForV1CountStarOptimization to transformForConstantCountStarOptimization in IcebergCountStarOptimizer Testing: - Added CALCITE_PLANNER_RUNTIME_PROFILE checks to verify compile-time optimization (NumRowGroups: 0) - Added test case for mixed aggregate functions with DV-only tables - Verified both native and Calcite planners produce expected runtime profiles Change-Id: I0e6239629ee779a64808a0a4bbe041ef756c5bb2 --- M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java M fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java M fe/src/main/java/org/apache/impala/rewrite/CountStarToConstRule.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/IcebergCountStarOptimizer.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteIcebergTable.java M testdata/workloads/functional-query/queries/QueryTest/iceberg-v3-plain-count-star-optimization.test 6 files changed, 157 insertions(+), 31 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/33/24733/1 -- To view, visit http://gerrit.cloudera.org:8080/24733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0e6239629ee779a64808a0a4bbe041ef756c5bb2 Gerrit-Change-Number: 24733 Gerrit-PatchSet: 1 Gerrit-Owner: Arnab Karmakar <[email protected]>
