Zoltan Borok-Nagy has posted comments on this change. ( 
https://gerrit.cloudera.org/25196 )

Change subject: IMPALA-15639: Don't trust the bounds of migrated Iceberg data 
files
......................................................................


Patch Set 2:

(9 comments)

Thanks for the comments!

https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/catalog/IcebergContentFileStore.java
File fe/src/main/java/org/apache/impala/catalog/IcebergContentFileStore.java:

https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/catalog/IcebergContentFileStore.java@237
PS1, Line 237:   private boolean hasImportedDataFiles_ = false;
> Its declared under the immutable members section but we do mutate it throug
It's the same as hasAvro_/hasOrc_/hasParquet_, which storeFile() also updates 
in mergeWithNewFiles(). The comment at the start of the section covers it: 
mergeWithNewFiles() only runs in catalogd, cloneWithoutMutables() only in 
coordinators (CatalogdMetaProvider). I extended the comment to mention the 
flags.


https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/catalog/IcebergContentFileStore.java@345
PS1, Line 345:
> nit: Can we assign this outside the loop?
Done


https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/catalog/IcebergContentFileStore.java@369
PS1, Line 369:
> I think the javadoc is missing mentions about write.data.path and obj store
Done


https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/catalog/IcebergContentFileStore.java@399
PS1, Line 399:     if (hasImportedDataFiles_) return;
> Is a stream per file necessary? I think a simple for loop would be cheaper.
Done


https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/planner/IcebergScanPlanner.java
File fe/src/main/java/org/apache/impala/planner/IcebergScanPlanner.java:

https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/planner/IcebergScanPlanner.java@1072
PS1, Line 1072:       Map<SlotId, SlotDescriptor> idToSlotDesc) {
> Can we reuse IcebergUtil.isIdentityPartitionedInAllSpecs() instead of a new
Done


https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/util/MigrateTableUtil.java
File fe/src/main/java/org/apache/impala/util/MigrateTableUtil.java:

https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/util/MigrateTableUtil.java@254
PS1, Line 254:    * Returns the ids of the fields whose bounds can't be read 
from the file footers: the
> Does TypeID.TIMESTAMP also cover timestamptz. If so, we can mention it here
Yes, timestamptz is TypeID.TIMESTAMP too. Mentioned it.


https://gerrit.cloudera.org/#/c/25196/1/fe/src/main/java/org/apache/impala/util/MigrateTableUtil.java@270
PS1, Line 270:   private static DataFile removeUnreliableBounds(DataFile 
dataFile, Params params) {
> I think we are rebuilding every DataFile and Metrics even when the file has
Done, such files are appended as they are.


https://gerrit.cloudera.org/#/c/25196/1/testdata/workloads/functional-query/queries/QueryTest/iceberg-migrate-from-external-hdfs-tables.test
File 
testdata/workloads/functional-query/queries/QueryTest/iceberg-migrate-from-external-hdfs-tables.test:

https://gerrit.cloudera.org/#/c/25196/1/testdata/workloads/functional-query/queries/QueryTest/iceberg-migrate-from-external-hdfs-tables.test@387
PS1, Line 387: ---- QUERY
> I think we're missing a case for append-only reload after the table has imp
Done. An INSERT after the migration reloads the table incrementally and keeps 
the restriction. The new migrated_locations cases cover 'write.data.path', 
'write.object-storage.path' (also without scheme) and a file system root. They 
need INVALIDATE METADATA: a property change alone doesn't rebuild the file 
store, only the next full reload does.


https://gerrit.cloudera.org/#/c/25196/1/testdata/workloads/functional-query/queries/QueryTest/iceberg-migrate-from-external-hdfs-tables.test@412
PS1, Line 412: The bounds
> I think we still collect value and null counts.
Fixed the comment and the query.



--
To view, visit https://gerrit.cloudera.org/25196
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id993ebe1e4c1daed3da1362c6e063c02f9a710d7
Gerrit-Change-Number: 25196
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Mon, 09 Nov 2026 15:18:30 +0000
Gerrit-HasComments: Yes

Reply via email to