mbutrovich commented on code in PR #3467:
URL: https://github.com/apache/iceberg-rust/pull/3467#discussion_r4743696474


##########
crates/iceberg/src/arrow/reader/pipeline.rs:
##########
@@ -728,7 +726,7 @@ impl FileScanTaskReader {
             coerce_int96_timestamps(&schema, task.schema()).unwrap_or(schema)
         } else if let Some(coerced) = coerce_int96_timestamps(file_schema, 
task.schema()) {

Review Comment:
   The description says INT96 coercion now runs on files with a list view, but 
no test reads such a file. On `main`, 
[`coerce_int96_timestamps`](https://github.com/apache/iceberg-rust/blob/3cef7b693e53a3f8c31c9ee1172de298546a8969/crates/iceberg/src/arrow/int96.rs#L49)
 returns `None` when its visitor fails on the list view, so the INT96 column is 
read without coercion.
   
   I checked this with a file holding `lv list_view<int>` and an INT96 `ts` of 
3333-01-01 12:00, both with field IDs, read through `read_int96_batches` 
projecting `ts`. `main` returns 7424657452580896 instead of 44318145600000000 
microseconds, and this branch returns the right value. Could we add that as a 
test next to `test_read_int96_timestamps_in_list`? `write_int96_parquet_file` 
shows the `SerializedFileWriter` setup, and the list view hint can go in 
through `WriterProperties::builder().set_key_value_metadata` with 
`ARROW_SCHEMA_META_KEY` and `encode_arrow_schema`.



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