Zoltan Borok-Nagy has posted comments on this change. ( https://gerrit.cloudera.org/25263 )
Change subject: IMPALA-15213: Iceberg UUID Avro read support ...................................................................... Patch Set 3: (9 comments) Thanks for working on this! https://gerrit.cloudera.org/#/c/25263/3//COMMIT_MSG Commit Message: https://gerrit.cloudera.org/#/c/25263/3//COMMIT_MSG@7 PS3, Line 7: IMPALA-15213: Iceberg UUID Avro read support This also fixes four things that aren't about UUID: the CodegenReadRecord crash (IMPALA-4061), NULL-struct children, the "zstandard" codec (IMPALA-15715) and the statsTuple_ NPE. Could you split them into separate commits, or at least name the Jiras so they get closed? https://gerrit.cloudera.org/#/c/25263/3//COMMIT_MSG@41 PS3, Line 41: count(*) the "count(*)" path isn't changed, only the overlap-predicate ones. https://gerrit.cloudera.org/#/c/25263/3/be/src/exec/avro/hdfs-avro-scanner.cc File be/src/exec/avro/hdfs-avro-scanner.cc: https://gerrit.cloudera.org/#/c/25263/3/be/src/exec/avro/hdfs-avro-scanner.cc@205 PS3, Line 205: avro_header_->use_codegend_decode_avro_data = avro_schema_equal( avro_schema_equal() compares record and fixed names. Iceberg files use 'table' / 'uuid_fixed', but the reader schema uses '<db>.<tbl>' / 'record_uuid_N'. So Iceberg Avro files always take the interpreted path, and READ_AVRO_UUID and CodegenSetNestedSlotsNull() never run. Please fix the "interpreted and codegen" claim, or name the reader schema the way Iceberg does. https://gerrit.cloudera.org/#/c/25263/3/be/src/util/decompress-test.cc File be/src/util/decompress-test.cc: https://gerrit.cloudera.org/#/c/25263/3/be/src/util/decompress-test.cc@614 PS3, Line 614: ZSTDMultipleBlocksNoContentSize Nit: the comment says "two concatenated frames", but each frame is decompressed on its own, and each one is a single block. Rename the test, or concatenate the frames. https://gerrit.cloudera.org/#/c/25263/3/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java File fe/src/main/java/org/apache/impala/catalog/HdfsTable.java: https://gerrit.cloudera.org/#/c/25263/3/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java@1880 PS3, Line 1880: fullName.replaceAll("-", "_") Nit: why replaceAll("-", "_")? Table and db names can't contain '-'. https://gerrit.cloudera.org/#/c/25263/3/fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java File fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java: https://gerrit.cloudera.org/#/c/25263/3/fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java@950 PS3, Line 950: if (!allParquet_ || statsTuple_ == null) return; The root cause is that for Iceberg, allParquet_ comes from write.format.default. Could IcebergScanNode compute it from fileFormats_ instead of guarding statsTuple_ in three places? This NPE also happens on master for non-UUID columns, so it needs its own Jira. https://gerrit.cloudera.org/#/c/25263/3/fe/src/main/java/org/apache/impala/util/AvroSchemaConverter.java File fe/src/main/java/org/apache/impala/util/AvroSchemaConverter.java: https://gerrit.cloudera.org/#/c/25263/3/fe/src/main/java/org/apache/impala/util/AvroSchemaConverter.java@209 PS3, Line 209: private Schema createRecordSchema(List<StructField> fields) { Nested fields have no default, so if a field is added to a struct (e.g. by Trino), reading it from older Avro files fails with "Field f is missing from file and does not have a default value". Parquet returns NULL here. Use Schema.NULL_VALUE here too? https://gerrit.cloudera.org/#/c/25263/3/testdata/workloads/functional-query/queries/QueryTest/iceberg-trino-interop-uuid.test File testdata/workloads/functional-query/queries/QueryTest/iceberg-trino-interop-uuid.test: https://gerrit.cloudera.org/#/c/25263/3/testdata/workloads/functional-query/queries/QueryTest/iceberg-trino-interop-uuid.test@427 PS3, Line 427: Unresolvable types for column 's': declared column type: STRUCT, table's Avro schema type: record With the default abort_on_error=false this isn't an error. The Avro files are skipped with a warning and only the Parquet rows come back. Could the planner reject struct slots when fileFormats_ contains AVRO, like checkVariantReadSupported()? A follow-up is fine. https://gerrit.cloudera.org/#/c/25263/3/testdata/workloads/functional-query/queries/QueryTest/iceberg-uuid-type.test File testdata/workloads/functional-query/queries/QueryTest/iceberg-uuid-type.test: https://gerrit.cloudera.org/#/c/25263/3/testdata/workloads/functional-query/queries/QueryTest/iceberg-uuid-type.test@344 PS3, Line 344: STRING,STRING,STRING The core tests only read top-level UUIDs. Nested reads, the NULL struct, zstd and the codegen crash are only covered by the exhaustive Trino test. Could you add `SELECT id FROM iceberg_v3_variant_avro` to iceberg-v3-variant.test (the IMPALA-4061 crash shape), plus an Avro fixture that has a NULL struct row? -- To view, visit https://gerrit.cloudera.org/25263 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic818ecad70f97f3646bbbb885de0b59420b28b44 Gerrit-Change-Number: 25263 Gerrit-PatchSet: 3 Gerrit-Owner: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Thu, 05 Nov 2026 15:20:56 +0000 Gerrit-HasComments: Yes
