2010YOUY01 commented on code in PR #18724:
URL: https://github.com/apache/datafusion/pull/18724#discussion_r2529691443
##########
datafusion/functions-nested/src/position.rs:
##########
@@ -172,13 +174,10 @@ fn general_position_dispatch<O: OffsetSizeTrait>(args:
&[ArrayRef]) -> Result<Ar
// if `start_from` index is out of bounds, return error
for (arr, &from) in list_array.iter().zip(arr_from.iter()) {
- if let Some(arr) = arr {
- if from < 0 || from as usize > arr.len() {
- return internal_err!("start_from index out of bounds");
- }
- } else {
- // We will get null if we got null in the array, so we don't need
to check
- }
+ assert_or_internal_err!(
Review Comment:
```suggestion
// If `arr` is `None`: we will get null if we got null in the array,
so we don't need to check
assert_or_internal_err!(
```
I suggest we keep the comment.
--
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]