alamb commented on code in PR #7893:
URL: https://github.com/apache/arrow-datafusion/pull/7893#discussion_r1481436570
##########
datafusion/common/src/scalar.rs:
##########
@@ -1377,6 +1402,70 @@ impl ScalarValue {
}};
}
+ fn build_struct_array(
+ scalars: impl IntoIterator<Item = ScalarValue>,
+ ) -> Result<ArrayRef> {
+ let arrays = scalars
+ .into_iter()
+ .map(|s| s.to_array())
+ .collect::<Result<Vec<_>>>()?;
+
+ let first_struct = arrays[0].as_struct_opt();
+ if first_struct.is_none() {
+ return _internal_err!(
+ "Inconsistent types in ScalarValue::iter_to_array. \
+ Expected ScalarValue::Struct, got {:?}",
+ arrays[0].clone()
+ );
+ }
+
+ let mut valid = BooleanBufferBuilder::new(arrays.len());
Review Comment:
https://github.com/apache/arrow-datafusion/issues/9145
--
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]