Skip to content

Mark ffi::ArrowArray::try_new is safe #2301

@tustvold

Description

@tustvold

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

ffi::ArrowArray::try_new is marked unsafe, this is despite being called by the safe function Array::to_raw.

I initially thought this was a mistake in Array::to_raw but I think this API shouldn't actually be marked unsafe. In particular leaking memory is not unsafe, and this appears to be the only consequence from misuse.

Describe the solution you'd like

We should make ffi::ArrowArray::try_new safe

Describe alternatives you've considered

We could not do this

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions