hcrosse opened a new issue, #3829:
URL: https://github.com/apache/iceberg-rust/issues/3829

   ### Describe the bug
   
   When `ArrowReader` builds a Parquet projection mask using field IDs or a 
`NameMapping`, `type_promotion_is_valid` rejects incompatible primitive file 
types (such as a Parquet `TIMESTAMP(MICROS)` column under an Iceberg 
`timestamp_ns` or `timestamptz_ns` field, or a narrower integer target). 
However, `get_arrow_projection_mask_with_field_ids` silently omits the rejected 
leaf instead of returning `ErrorKind::DataInvalid`.
   
   As a result:
   
   - Selecting the column alongside another column (for example `id` and `ts`) 
drops the incompatible leaf from the projection mask, and 
`RecordBatchTransformer` silently fills an optional column with NULLs while 
predicates still evaluate against the file's column.
   - Selecting only the incompatible column leaves the projected leaf list 
empty, which triggers the `ProjectionMask::all()` fallback and reads and casts 
the column instead of rejecting it.
   
   This is distinct from #3617 / #3623, which handles Parquet 
`TIMESTAMP(MILLIS)` columns.
   
   ### Expected behavior
   
   Field-ID and name-mapped projection should fail with 
`ErrorKind::DataInvalid` when a requested leaf column in the Parquet file has 
an incompatible primitive type, while continuing to allow valid Iceberg v3 
primitive promotions (including date to microsecond or nanosecond timestamps, 
and unknown to any primitive type) and missing evolved columns.
   


-- 
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