Skip to content

Array Destructuring APIs #3879

@tustvold

Description

@tustvold

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

As part of #1799 strongly typed ArrayData abstractions were added that allow constructing arrays from their constituent parts, and destructuring arrays back into their parts. Whilst it looks like we won't be moving ahead with a strongly typed ArrayData abstraction, these APIs are powerful and should be ported across to the corresponding Array implementation.

Describe the solution you'd like

Each of the various Array should have:

  • An unsafe new_unchecked that constructs it from raw ScalarBuffer, OffsetBuffer, etc...
  • A safe try_new method that performs validation and returns a Result
  • An into_parts method that returns the constituent parts that can be fed to new_unchecked
  • Methods should return &ScalarBuffer<T>, &BooleanBuffer, etc... instead of &[T], &[u8] etc...

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

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