Arnab Karmakar has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24733 )

Change subject: IMPALA-14996: Optimize count(*) for Iceberg V3 DV-only tables
......................................................................


Patch Set 4:

(4 comments)

Thanks for the comments!

http://gerrit.cloudera.org:8080/#/c/24733/3/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
File fe/src/main/java/org/apache/impala/analysis/SelectStmt.java:

http://gerrit.cloudera.org:8080/#/c/24733/3/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@1561
PS3, Line 1561:
> It's better to check hasDeleteFiles first as hasOnlyDeletionVectors is doin
Done


http://gerrit.cloudera.org:8080/#/c/24733/3/fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java
File fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java:

http://gerrit.cloudera.org:8080/#/c/24733/3/fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java@1258
PS3, Line 1258: HdfsPartition> entry :
> What happens if the table has dangling deletes? the total pos del count con
It can return wrong results as snapshot total-position-deletes can include 
dangling deletes that are not in the content file store and we are now using 
cached non-dangling DV record counts.


http://gerrit.cloudera.org:8080/#/c/24733/3/fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java@1258
PS3, Line 1258: HdfsPartition> entry :
> I'm wondering about one more possible improvement, which can help in non-ti
Thanks for the suggestion! Now for travelSpec == null, it uses record count 
summed when the store is built. That matches non-dangling DVs only. Time travel 
still uses snapshot total-position-deletes.


http://gerrit.cloudera.org:8080/#/c/24733/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteIcebergTable.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteIcebergTable.java:

http://gerrit.cloudera.org:8080/#/c/24733/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteIcebergTable.java@97
PS3, Line 97:           getRecordCount() > 0 && !hasDeleteFiles();
> Consider the following example:
canApplyCountStarOptimization() is back to !hasDeleteFiles(). Tables with 
deletion vectors must scan and apply the deletes when there's a filter.



--
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: comment
Gerrit-Change-Id: I0e6239629ee779a64808a0a4bbe041ef756c5bb2
Gerrit-Change-Number: 24733
Gerrit-PatchSet: 4
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Nandor Kollar <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Comment-Date: Wed, 07 Oct 2026 11:27:23 +0000
Gerrit-HasComments: Yes

Reply via email to