Visorgood opened a new pull request, #19153:
URL: https://github.com/apache/iceberg/pull/19153

   Closes #19138.
   
   Reading a Parquet file fails when the read schema has a struct with no 
projected fields, e.g. after `DROP COLUMN items.element.a` removes the only 
field of `items ARRAY<STRUCT<a INT>>`:
   
       IllegalArgumentException: [items, list, element, a] optional int32 a = 4 
is not in the store: [[id] required int32 id = 1] 1
   
   The same happens for a top-level struct (`DROP COLUMN s.a`) and for a map 
value struct (`DROP COLUMN m.value.a`). Reproduced on main (6cf1f6e) with Spark 
4.2 SQL and with the generic reader.
   
   The requested Parquet schema drops such a struct, but the reader still reads 
a column under it: the column that shows whether the struct is null (top-level 
struct, list element), or the map key.
   
   This draft adds tests to `ReadFormatModelTests` (generic, Spark and Flink 
readers) that fail for Parquet on main. ORC fails them with a different error 
(#19137) and is skipped for now. The fix will follow in the next commit.
   
   Co-authored with Claude Opus 5.5. I reviewed the code and ran the tests 
locally.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to