Skip to content

copy_array panics on offset overflow instead of returning an error #5706

Closed
rich7420/datafusion-comet
#4

Description

@andygrove

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.

Activity

  1. added
    bugSomething isn't working
    priority:lowMinor issues, test failures, tooling, cosmetic
    area:ffiArrow FFI / JNI boundary
    on Sep 5, 2026
  2. andygrove commented on Sep 5, 2026

    @andygrove
    MemberAuthor

    Tracked under #5709 ([EPIC] DataFusion 55 upgrade follow-ups).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ffiArrow FFI / JNI boundarybugSomething isn't workingpriority:lowMinor issues, test failures, tooling, cosmeticrequires-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions