andygrove opened a new issue, #7842:
URL: https://github.com/apache/datafusion-comet/issues/7842

   ### Describe the bug
   
   A native Iceberg scan can drop rows that no equality-delete value matches, 
when a data file stores the key column in a narrower type than the table (for 
example `INT` data in a `BIGINT` column) and the delete file holds both a value 
that fits that type and one that does not. iceberg-rust compares the delete 
values with the file's narrower type incorrectly (apache/iceberg-rust#3122).
   
   #7834 makes the scan fall back to Spark when the table's metadata shows such 
a file can exist: a promoted column, expired schemas, or a name mapping. One 
shape has no sign in the metadata: a file appended with field ids that carry 
the narrower type, on a table with a single schema and no name mapping. A table 
promoted before Iceberg 0.12 looks the same.
   
   ### Steps to reproduce
   
   Reported in the review of #7834 and reproduced there on a build with #7712. 
Take a table with a `BIGINT` key `id` and a string column `v`, and no name 
mapping. Append, through the Java API, one Parquet file that stores `id` as 
`INT32` with the table's field id and holds `(1, 'a'), (2, 'b'), (3, 'c')`, as 
the test `residuals keep rows from an appended file whose field ids carry 
narrower types (#7138)` in `CometIcebergNativeSuite` does, and insert `(4, 
'd')`. Then commit an equality-delete file on `id` holding `2` and `3000000000`.
   
   ### Expected behavior
   
   `SELECT * FROM t ORDER BY id` returns `[1,a] [3,c] [4,d]`, as Spark does. 
The native scan returns `[4,d]`.
   
   ### Additional context
   
   Reported in the review of #7834, which reproduced it. The iceberg-rust fixes 
are apache/iceberg-rust#3507 and apache/iceberg-rust#3540, and the pin bump in 
#7798 includes both. The fix for this issue is that bump. Until then the user 
guide lists it under "Reads that differ from Spark".
   
   Tracked with the pin bumps on #5645.
   


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