Baunsgaard commented on code in PR #3629:
URL: https://github.com/apache/iceberg-rust/pull/3629#discussion_r4497307416


##########
crates/iceberg/src/arrow/reader/projection.rs:
##########
@@ -2482,4 +2482,162 @@ message schema {
             .unwrap();
         assert_eq!(result, vec![expected]);
     }
+
+    /// parquet-rs can return a LIST as `FixedSizeList` when the file's 
embedded Arrow schema
+    /// says so. Iceberg has no such type; the table column is a plain list. 
Also covers a null
+    /// parent (parquet-rs pads `size` children) with both optional and 
required elements.
+    #[tokio::test]
+    async fn test_read_fixed_size_list_column_as_list() {

Review Comment:
   Done. Added `test_read_fixed_size_list_without_field_ids`: no field IDs, 
name mapping and fallback IDs, null rows, required top-level element, plus 
FixedSizeList inside a struct, as a map value, as a list element, and nested 
FixedSizeList.



##########
crates/iceberg/src/arrow/record_batch_transformer.rs:
##########
@@ -254,10 +256,12 @@ impl PromotePlan {
                     fields: target_fields.clone(),
                 })
             }
-            // A file's Arrow schema hint can give either offset width; 
`apply` converts it.
-            // Table schemas are always `List` 
(`ToArrowSchemaConverter::list`).
+            // File Arrow hints may be List, LargeList, or FixedSizeList. 
Iceberg has no
+            // fixed-size list; tables are always List 
(`ToArrowSchemaConverter::list`).
             (
-                DataType::List(source_field) | 
DataType::LargeList(source_field),
+                DataType::List(source_field)
+                | DataType::LargeList(source_field)
+                | DataType::FixedSizeList(source_field, _),

Review Comment:
   Done. Dropped the PromotePlan arm and `list_from_fixed_size_list`. 
`coerce_fixed_size_lists` rewrites FixedSizeList to List at the top of 
`configure_arrow_reader_metadata`, before name mapping and fallback IDs, same 
placement as #3467. 
   
   #3467 is still open, so this PR contains the FixedSizeList rewrite on its 
own; when list views land, the FixedSizeList arm can fold into that helper.



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