Hello Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    https://gerrit.cloudera.org/25263

to look at the new patch set (#2).

Change subject: IMPALA-15213: Iceberg UUID Avro read support
......................................................................

IMPALA-15213: Iceberg UUID Avro read support

Iceberg stores UUID in Avro as fixed(16) with logicalType=uuid. Impala
now reads top-level UUID columns from Avro data files and UUID fields
nested inside STRUCT columns when write.format.default is Parquet or ORC
(including the Impala default when the HMS property is unset). With
write.format.default=avro, queries that materialize a complex column
still fail at analysis or planning.

Backend:
- fixed(16) maps to UUID. New ReadAvroUuid() for the interpreted and
  codegen paths.
- Named types reused in a schema are AVRO_LINKs. They are now
  resolved to their target and recursive schemas are rejected.
- A NULL nullable struct has no nested bytes in Avro, so its child
  slots were left set and read as 0000...-0000. They are now set to
  NULL (interpreted and codegen).
- Codegen: a nested record previously fell through to CreateCondBr()
  with a null ret_val. It now branches directly after the record.
- The "zstandard" Avro codec (used by Trino) was rejected as unknown.
  It now maps to ZSTD.
- ZstandardDecompressor::MaxOutputLen() now returns an upper bound
  from ZSTD_decompressBound() instead of -1, so ProcessBlock() works
  without a preallocated output buffer. Uses
  ZSTD_STATIC_LINKING_ONLY, defined in decompress.cc.

Frontend:
- Iceberg tables with Avro data files use an Avro reader schema built
  from Impala column types (HMS is lossy for UUID). AvroSchemaConverter
  maps UUID to fixed(16)+logicalType uuid, VARIANT to
  record{metadata,value} bytes (same as HMS), and sets Schema.NULL_VALUE
  on top-level fields in convertColumns() so schema evolution matches
  the old HMS path.
- Removed validateUuidReadSupported().
- HdfsScanNode: guard the Parquet stats/min-max/count(*) paths
  against a null statsTuple_, which is NPE-prone for Parquet-default
  Iceberg tables scanning Avro files with runtime filters.

Testing:
- E2E tests for Avro reads, predicates and joins with the Parquet and
  ORC fixtures, including the write.format.default switch.
- Trino interop tests for Avro structs (nested scalars with a
  Parquet/ORC default, rejection with an Avro default), mixed
  Parquet/Avro files and ARRAY<UUID> rejection.
- AvroSchemaConverterTest, BE unit tests for ReadAvroUuid, AVRO_LINK,
  recursive schemas, ParseAvroCodecMetadata, and zstd frames with and
  without content size.

Change-Id: Ic818ecad70f97f3646bbbb885de0b59420b28b44
Assisted-by: Composer 2.5 (Cursor)
---
M be/src/codegen/gen_ir_descriptions.py
M be/src/exec/avro/hdfs-avro-scanner-ir.cc
M be/src/exec/avro/hdfs-avro-scanner-test.cc
M be/src/exec/avro/hdfs-avro-scanner.cc
M be/src/exec/avro/hdfs-avro-scanner.h
M be/src/util/avro-util.cc
M be/src/util/decompress-test.cc
M be/src/util/decompress.cc
M fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java
M fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
M fe/src/main/java/org/apache/impala/catalog/IcebergTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalFsTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalIcebergTable.java
M fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java
M fe/src/main/java/org/apache/impala/util/AvroSchemaConverter.java
A fe/src/test/java/org/apache/impala/util/AvroSchemaConverterTest.java
M testdata/data/README
M 
testdata/workloads/functional-query/queries/QueryTest/iceberg-trino-interop-uuid.test
M testdata/workloads/functional-query/queries/QueryTest/iceberg-uuid-type.test
19 files changed, 956 insertions(+), 89 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/63/25263/2
--
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: newpatchset
Gerrit-Change-Id: Ic818ecad70f97f3646bbbb885de0b59420b28b44
Gerrit-Change-Number: 25263
Gerrit-PatchSet: 2
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>

Reply via email to