Skip to content

replace Dictionary::try_new() calls with with_values.#9894

Merged
alamb merged 1 commit into
apache:mainfrom
Rich-T-kid:rich-T-kid/minor-dict-optimization
May 5, 2026
Merged

replace Dictionary::try_new() calls with with_values.#9894
alamb merged 1 commit into
apache:mainfrom
Rich-T-kid:rich-T-kid/minor-dict-optimization

Conversation

@Rich-T-kid
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

keeps consistency with the rest of the code base

What changes are included in this PR?

replaced two try_new() calles with with_values(), logically the same.

Are these changes tested?

yes, all test pass

Are there any user-facing changes?

no

@github-actions github-actions Bot added the arrow Changes to the arrow crate label May 5, 2026
@Rich-T-kid Rich-T-kid marked this pull request as ready for review May 5, 2026 02:14
@alamb alamb merged commit d88cc48 into apache:main May 5, 2026
26 checks passed
@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 5, 2026

Thank you @Rich-T-kid and @Jefffrey

Rich-T-kid added a commit to Rich-T-kid/arrow-rs that referenced this pull request Jun 2, 2026
# Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax.
-->

- Closes apache#9889.

# Rationale for this change
keeps consistency with the rest of the code base
<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->

# What changes are included in this PR?
replaced two try_new() calles with **with_values()**, logically the
same.
<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

# Are these changes tested?
yes, all test pass
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?

If this PR claims a performance improvement, please include evidence
such as benchmark results.
-->

# Are there any user-facing changes?
no
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.

If there are any breaking changes to public APIs, please call them out.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants