adriangb commented on code in PR #21984:
URL: https://github.com/apache/datafusion/pull/21984#discussion_r3250770842
##########
datafusion/functions-nested/src/arrays_zip.rs:
##########
@@ -223,12 +264,17 @@ fn arrays_zip_inner(args: &[ArrayRef]) ->
Result<ArrayRef> {
.map(|v| v.as_ref().map(|view| view.values.to_data()))
.collect();
- let struct_fields: Fields = element_types
- .iter()
- .enumerate()
- .map(|(i, dt)| Field::new(format!("{}", i + 1), dt.clone(), true))
- .collect::<Vec<_>>()
- .into();
+ // Prefer the planning-time struct fields (which preserve input metadata)
+ // when available; fall back to building bare fields from element types.
+ let struct_fields: Fields = match inner_field.as_ref().map(|f|
f.data_type()) {
Review Comment:
Yes this should not happen unless people are calling from rust and doing
somewhat weird things.
--
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]