Hello Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
https://gerrit.cloudera.org/25413
to look at the new patch set (#2).
Change subject: IMPALA-15470/IMPALA-4061: Set fields of NULL structs to NULL in
Avro scans
......................................................................
IMPALA-15470/IMPALA-4061: Set fields of NULL structs to NULL in Avro scans
Iceberg tables can have Avro data files next to Parquet ones, so a
STRUCT column can be read from Avro even though the planner only checks
the table's default format. For a NULL struct, the Avro scanner set the
struct's null indicator but not the indicators of its child slots
returned stale values (0 and '') instead of NULL. The codegen'd decoder
had the same gap.
Changes:
- The interpreted and codegen'd decoders set every materialized slot
under a NULL record to NULL, including slots in nested records.
- Codegen was only used for a file whose schema matched the table schema
exactly. Iceberg files name their records "table" and "r2", while the
reader schema uses "<db>.<tbl>", so they always fell back to the
interpreted path. Replace avro_schema_equal() with
SchemasMatchForCodegen(), which ignores record names and compares
everything that affects decoding.
- Nested records in codegen no longer pass an unset value to
CreateCondBr(), which crashed impalad (LLVM assertion in debug builds).
This also fixes IMPALA-4061 for nested records in Avro scans.
Testing:
- Added QueryTest/iceberg-avro-struct.test: NULL struct fields,
count and filter over NULL struct fields, and a select of only id.
Each query runs with the interpreted and the codegen'd decoder.
- New fixture iceberg_avro_null_struct, created with
the Iceberg Java API (version 1.11.0). It is a Parquet-default table
with one Avro data file.
Change-Id: If45b48b46bf23234371ea1e774a9e6c6a06d41ad
Assisted-by: Claude Haiku 5.5 (Cursor)
---
M be/src/exec/avro/hdfs-avro-scanner.cc
M be/src/runtime/descriptors.h
M testdata/data/README
A
testdata/data/iceberg_test/iceberg_avro_null_struct/data/00000-0-1355e32c-64af-499b-9a95-797c39bf9c19-1-00001.avro
A
testdata/data/iceberg_test/iceberg_avro_null_struct/metadata/a83590ac-21ae-42ab-9a55-fb722c2c6d23-m0.avro
A
testdata/data/iceberg_test/iceberg_avro_null_struct/metadata/snap-6054870638555270448-1-a83590ac-21ae-42ab-9a55-fb722c2c6d23.avro
A testdata/data/iceberg_test/iceberg_avro_null_struct/metadata/v1.metadata.json
A testdata/data/iceberg_test/iceberg_avro_null_struct/metadata/v2.metadata.json
A testdata/data/iceberg_test/iceberg_avro_null_struct/metadata/v3.metadata.json
A testdata/data/iceberg_test/iceberg_avro_null_struct/metadata/version-hint.text
A testdata/workloads/functional-query/queries/QueryTest/iceberg-avro-struct.test
M tests/query_test/test_iceberg.py
12 files changed, 156 insertions(+), 8 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/13/25413/2
--
To view, visit https://gerrit.cloudera.org/25413
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If45b48b46bf23234371ea1e774a9e6c6a06d41ad
Gerrit-Change-Number: 25413
Gerrit-PatchSet: 2
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>