adriangb commented on code in PR #21714:
URL: https://github.com/apache/datafusion/pull/21714#discussion_r4420649124


##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -444,7 +443,13 @@ impl LogicalPlanBuilder {
                     );
                 }
             }
-            fields.push(field_type.to_owned(), field_nullable);
+            let field = schema.field(j);
+
+            fields.push_with_metadata(
+                field_type.clone(),
+                field.is_nullable(),
+                Some(FieldMetadata::new_from_field(field)),

Review Comment:
   The only test that catches this line being reverted (back to `None`) is 
`test_insert_infer_with_metadata` in `params.rs`; the `.slt` file still passes, 
because reading back from the table always shows the table's metadata. Could 
you add a test that checks the field metadata of the `VALUES` plan itself (for 
example, a `datafusion-sql` plan test for `INSERT INTO <uuid table> VALUES 
(X'...')` that asserts the `Values` node's schema carries `arrow.uuid`)?



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