Skip to content

should use DictionaryArray::with_values instead of try_new on the dictionary fast path #9889

@Rich-T-kid

Description

@Rich-T-kid

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In arrow-string/src/substring.rs:88-90 (inside the substring_dict! macro), the dictionary fast path rebuilds the result with DictionaryArray::try_new
Since the keys are unchanged and the values' length is unchanged (one substring per dictionary value), this is exactly what
https://docs.rs/arrow-array/latest/arrow_array/array/struct.DictionaryArray.html#method.with_values is for:

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Pretty small change, noticed it while working on REE but I dont want to clutter the PR

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions