Describe the bug
The arrow 59 migration moved MutableArrayData::extend to the fallible try_extend, but copy_array turns the error straight back into a panic:
native/core/src/execution/operators/copy.rs:42 and :57
mutable
.try_extend(0, 0, capacity)
.expect("extend failed due to offset overflow");
Both callers are already in Result context, so an offset overflow aborts the JVM instead of failing the task, which is exactly what arrow deprecated extend for.
Expected behavior
copy_array returns Result<ArrayRef> and the two call sites propagate, turning an offset overflow into a task failure.
Additional context
Found while reviewing #5262.
Describe the bug
The arrow 59 migration moved
MutableArrayData::extendto the fallibletry_extend, butcopy_arrayturns the error straight back into a panic:native/core/src/execution/operators/copy.rs:42and:57mutable .try_extend(0, 0, capacity) .expect("extend failed due to offset overflow");Both callers are already in
Resultcontext, so an offset overflow aborts the JVM instead of failing the task, which is exactly what arrow deprecatedextendfor.Expected behavior
copy_arrayreturnsResult<ArrayRef>and the two call sites propagate, turning an offset overflow into a task failure.Additional context
Found while reviewing #5262.