Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24440 )
Change subject: IMPALA-14993: Fix count star optimization incorrectly activating without count(*) ...................................................................... IMPALA-14993: Fix count star optimization incorrectly activating without count(*) The Iceberg V2 count star optimization (optimizePlainCountStarQueryV2) activated for queries like 'SELECT 1 FROM iceberg_table' when the table had delete files, causing incorrect results (missing rows). The validation loop rejected non-count(*)/non-constant expressions but never verified that at least one count(*) was actually present. Added a hasCountStarFunc guard matching the existing V1 method's logic. Also added regression tests for both Iceberg V2 and V3 (Deletion Vector) tables. Testing: * Added V2 regression test with SELECT 1 on table with position deletes * Added V3 test covering count(*) optimization and the IMPALA-14993 fix Change-Id: I8eb13aecef6d3b7460f7201dce6e03d6f3de303a Assisted-by: Claude Opus 4.6 <[email protected]> Reviewed-on: http://gerrit.cloudera.org:8080/24440 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java M testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-plain-count-star-optimization.test A testdata/workloads/functional-query/queries/QueryTest/iceberg-v3-plain-count-star-optimization.test M tests/query_test/test_iceberg.py 4 files changed, 86 insertions(+), 1 deletion(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/24440 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8eb13aecef6d3b7460f7201dce6e03d6f3de303a Gerrit-Change-Number: 24440 Gerrit-PatchSet: 5 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
