jecsand838 commented on code in PR #8274:
URL: https://github.com/apache/arrow-rs/pull/8274#discussion_r2322628559


##########
arrow-avro/src/schema.rs:
##########
@@ -909,20 +998,42 @@ fn datatype_to_avro(
             if matches!(dt, DataType::LargeList(_)) {
                 extras.insert("arrowLargeList".into(), Value::Bool(true));
             }
-            let (items, ie) =
-                datatype_to_avro(child.data_type(), child.name(), 
child.metadata(), name_gen)?;
+            let (items_inner, ie) = datatype_to_avro_with_order(
+                child.data_type(),
+                child.name(),
+                child.metadata(),
+                name_gen,
+                order,
+            )?;
+            let items_with_meta = merge_extras(items_inner, ie);
+            let items_schema = if child.is_nullable() {
+                wrap_nullable(items_with_meta, order)
+            } else {
+                items_with_meta
+            };

Review Comment:
   Solid catch, I'll add that in!



##########
arrow-avro/src/schema.rs:
##########
@@ -909,20 +998,42 @@ fn datatype_to_avro(
             if matches!(dt, DataType::LargeList(_)) {
                 extras.insert("arrowLargeList".into(), Value::Bool(true));
             }
-            let (items, ie) =
-                datatype_to_avro(child.data_type(), child.name(), 
child.metadata(), name_gen)?;
+            let (items_inner, ie) = datatype_to_avro_with_order(
+                child.data_type(),
+                child.name(),
+                child.metadata(),
+                name_gen,
+                order,
+            )?;
+            let items_with_meta = merge_extras(items_inner, ie);
+            let items_schema = if child.is_nullable() {
+                wrap_nullable(items_with_meta, order)
+            } else {
+                items_with_meta
+            };
             json!({
                 "type": "array",
-                "items": merge_extras(items, ie)
+                "items": items_schema
             })
         }
         DataType::FixedSizeList(child, len) => {
             extras.insert("arrowFixedSize".into(), json!(len));
-            let (items, ie) =
-                datatype_to_avro(child.data_type(), child.name(), 
child.metadata(), name_gen)?;
+            let (items_inner, ie) = datatype_to_avro_with_order(
+                child.data_type(),
+                child.name(),
+                child.metadata(),
+                name_gen,
+                order,
+            )?;
+            let items_with_meta = merge_extras(items_inner, ie);

Review Comment:
   Solid catch, @scovich caught this one too.



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

Reply via email to