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

Change subject: IMPALA-15470/IMPALA-4061: Set fields of NULL structs to NULL in 
Avro scans
......................................................................


Patch Set 2: Code-Review+1

(6 comments)

LGTM! Only left small comments.

https://gerrit.cloudera.org/#/c/25413/2//COMMIT_MSG
Commit Message:

https://gerrit.cloudera.org/#/c/25413/2//COMMIT_MSG@11
PS2, Line 11: set the
            : struct's null indicator but not the indicators of its child slots
This sentence doesn't parse. Also, Avro scans have no slot for the struct 
itself, so
nothing set its null indicator. Maybe: "For a NULL struct, the Avro scanner 
didn't set the
null indicators of the struct's fields, so they returned stale values (0 and 
'') instead of
NULL." The old codegen crashed on nested records (IMPALA-4061), so "The 
codegen'd decoder
had the same gap" can go.


https://gerrit.cloudera.org/#/c/25413/2//COMMIT_MSG@19
PS2, Line 19: Codegen was only used
Please state the result: Avro files that differ from the table schema only in 
record names (most Iceberg Avro files, e.g. iceberg_avro_format) now use the 
codegen'd decoder. Files with required fields (NOT NULL columns, VARIANT) still 
use the interpreted one.


https://gerrit.cloudera.org/#/c/25413/2/testdata/workloads/functional-query/queries/QueryTest/iceberg-avro-struct.test
File 
testdata/workloads/functional-query/queries/QueryTest/iceberg-avro-struct.test:

https://gerrit.cloudera.org/#/c/25413/2/testdata/workloads/functional-query/queries/QueryTest/iceberg-avro-struct.test@1
PS2, Line 1: ====
The fixture has only one struct level, so the recursion in SetNestedSlotsNull() 
and CodegenSetNestedSlotsNull() never runs. Dropping either recursive call 
keeps the test green. Could you add e.g. s2 STRUCT<x INT, t STRUCT<y INT, z 
STRING>> with rows where s2, s2.t, or s2.t.y is NULL? (I tried such a table 
locally, and both decoders are correct.)


https://gerrit.cloudera.org/#/c/25413/2/testdata/workloads/functional-query/queries/QueryTest/iceberg-avro-struct.test@31
PS2, Line 31: # IMPALA-4061: codegen crashed on a nested record in an Avro 
scan. Selecting only 'id'
IMPALA-4061's repro also has SELECT id on a V3 VARIANT table in Avro, and 
iceberg_v3_variant_avro is already loaded in test_v3_variant. Could you add 
"SELECT id, p FROM iceberg_v3_variant_avro ORDER BY id" (1,1 .. 5,1) to 
iceberg-v3-variant.test? It works on PS2.


https://gerrit.cloudera.org/#/c/25413/2/tests/query_test/test_iceberg.py
File tests/query_test/test_iceberg.py:

https://gerrit.cloudera.org/#/c/25413/2/tests/query_test/test_iceberg.py@1560
PS2, Line 1560:     for disable_codegen in (True, False):
Nothing checks that the disable_codegen=False run really decodes with the 
codegen'd function. If SchemasMatchForCodegen() returned false, all queries 
would still pass. Could you check "Codegen enabled: 1 out of 1" / "0 out of 1" 
in the scan profile here? (It is 1/1 on PS2.)


https://gerrit.cloudera.org/#/c/25413/2/tests/query_test/test_iceberg.py@1563
PS2, Line 1563:       
new_vector.get_value('exec_option')['disable_codegen_rows_threshold'] = 0
Nit: disable_codegen_rows_threshold is already 0 in the default dimension. In 
exhaustive, the vector already has both disable_codegen values, so each mode 
runs twice.



--
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: comment
Gerrit-Change-Id: If45b48b46bf23234371ea1e774a9e6c6a06d41ad
Gerrit-Change-Number: 25413
Gerrit-PatchSet: 2
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Thu, 12 Nov 2026 15:09:30 +0000
Gerrit-HasComments: Yes

Reply via email to