Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/25196
Change subject: IMPALA-15639: Don't trust the bounds of migrated Iceberg data files ...................................................................... IMPALA-15639: Don't trust the bounds of migrated Iceberg data files ALTER TABLE CONVERT TO ICEBERG gets the metrics of the data files from Iceberg's TableMigrationUtil, which reads the min/max statistics of the Parquet footers as if they had the Iceberg type of the column. This is wrong e.g. for INT64 timestamps with MILLIS or NANOS unit, and for decimals whose scale was changed in the Hive table before the migration. Iceberg used these bounds to skip data files with matching rows when predicates were pushed down. CONVERT TO ICEBERG now removes the bounds of TIMESTAMP and DECIMAL columns from the metrics of the imported data files. Tables that were migrated earlier, or by other engines, still have such bounds. Imported data files keep their original location, while Impala and other engines write new data files under the data location of the table, '<table location>/data' by default. The content file store now records whether a table has data files outside its data location, comparing paths without scheme and authority. Only predicates on identity partition columns of every partition spec are pushed down to Iceberg for such tables, because data files only have metrics for these columns if they store them. The restriction goes away once the imported files are rewritten, e.g. by OPTIMIZE. Limitations: - Time travel to a snapshot that still had imported files is not restricted after that. - Data files written to an earlier data location of the table, e.g. before 'write.data.path' was changed, are treated as imported too. Testing: - Added EE tests for migrated tables, with partition evolution, and before and after OPTIMIZE. - Updated a test of a table that has data files in several data locations. Change-Id: Id993ebe1e4c1daed3da1362c6e063c02f9a710d7 Assisted-by: Claude Opus 5.5 (Claude Code) --- M common/thrift/CatalogObjects.thrift M fe/src/main/java/org/apache/impala/catalog/IcebergContentFileStore.java M fe/src/main/java/org/apache/impala/catalog/IcebergFileMetadataLoader.java M fe/src/main/java/org/apache/impala/planner/IcebergScanPlanner.java M fe/src/main/java/org/apache/impala/util/MigrateTableUtil.java M testdata/workloads/functional-query/queries/QueryTest/iceberg-migrate-from-external-hdfs-tables.test M testdata/workloads/functional-query/queries/QueryTest/iceberg-multiple-storage-locations-table.test 7 files changed, 211 insertions(+), 7 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/96/25196/1 -- To view, visit http://gerrit.cloudera.org:8080/25196 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id993ebe1e4c1daed3da1362c6e063c02f9a710d7 Gerrit-Change-Number: 25196 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]>
