jayzhan211 commented on code in PR #6986:
URL: https://github.com/apache/arrow-datafusion/pull/6986#discussion_r1266046670
##########
datafusion/physical-expr/src/array_expressions.rs:
##########
@@ -543,7 +545,18 @@ fn align_array_dimensions(args: Vec<ArrayRef>) ->
Result<Vec<ArrayRef>> {
let mut aligned_array = array.clone();
for _ in 0..(max_ndim - ndim) {
let data_type = aligned_array.as_ref().data_type().clone();
- aligned_array = array_array(&[aligned_array], data_type)?;
+ let offsets: Vec<i32> =
+ (0..downcast_arg!(aligned_array,
ListArray).offsets().len())
+ .map(|i| i as i32)
+ .collect();
+ let field = Arc::new(Field::new("item", data_type, true));
+
+ aligned_array = Arc::new(ListArray::try_new(
Review Comment:
There are `downcast_arg()` in this file, `as_list_array` in
`datafusion/common/src/cast.rs` and `as_list, as_list_opt` in arrow-array.
Which one to use among these methods?
--
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]