Jefffrey commented on code in PR #18432:
URL: https://github.com/apache/datafusion/pull/18432#discussion_r2485422971
##########
datafusion/functions-nested/src/extract.rs:
##########
@@ -449,10 +452,162 @@ fn array_slice_inner(args: &[ArrayRef]) ->
Result<ArrayRef> {
let array = as_large_list_array(&args[0])?;
general_array_slice::<i64>(array, from_array, to_array, stride)
}
+ ListView(_) => {
+ let array = as_list_view_array(&args[0])?;
+ general_list_view_array_slice::<i32>(array, from_array, to_array,
stride)
+ }
+ LargeListView(_) => {
+ let array = as_large_list_view_array(&args[0])?;
+ general_list_view_array_slice::<i64>(array, from_array, to_array,
stride)
+ }
_ => exec_err!("array_slice does not support type: {}",
array_data_type),
}
}
+fn adjusted_from_index<O: OffsetSizeTrait>(index: i64, len: O) ->
Result<Option<O>>
Review Comment:
Looks like this + `adjusted_to_index` is just pulled out from their
##########
datafusion/functions-nested/src/extract.rs:
##########
@@ -449,10 +452,162 @@ fn array_slice_inner(args: &[ArrayRef]) ->
Result<ArrayRef> {
let array = as_large_list_array(&args[0])?;
general_array_slice::<i64>(array, from_array, to_array, stride)
}
+ ListView(_) => {
+ let array = as_list_view_array(&args[0])?;
+ general_list_view_array_slice::<i32>(array, from_array, to_array,
stride)
+ }
+ LargeListView(_) => {
+ let array = as_large_list_view_array(&args[0])?;
+ general_list_view_array_slice::<i64>(array, from_array, to_array,
stride)
+ }
_ => exec_err!("array_slice does not support type: {}",
array_data_type),
}
}
+fn adjusted_from_index<O: OffsetSizeTrait>(index: i64, len: O) ->
Result<Option<O>>
Review Comment:
Looks like this + `adjusted_to_index` is just pulled out from their
--
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]