Skip to content

PrimitiveDictionaryBuilder.finish should use actual value type - #3972

Merged
tustvold merged 1 commit into
apache:masterfrom
viirya:fix_primitive_dict_builder
Mar 28, 2023
Merged

tustvold merged 1 commit into
apache:masterfrom
viirya:fix_primitive_dict_builder

Conversation

@viirya

@viirya viirya commented Mar 28, 2023

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #3971.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Mar 28, 2023
@tustvold
tustvold merged commit 6c13dd7 into apache:master Mar 28, 2023
Jefffrey pushed a commit that referenced this pull request Oct 2, 2026
…ms (#11327)

# Which issue does this PR close?

- Relates to #3972

# Rationale for this change

`PrimitiveDictionaryBuilder::finish_cloned` and `finish_preserve_values`
built the dictionary with `V::DATA_TYPE`, which is the default
`DataType` for the dictionary's value type. This loses type parameters,
like the scale/precision of a decimal value.

A similar bug was fixed for `finish` in #3972, but `finish_cloned` and
`finish_preserve_values` was missed.

# What changes are included in this PR?

See above.

# Are these changes tested?

Yes; existing tests pass, test expanded to cover this behavior. Verified
that the updated test fails without the behavior change.

# Are there any user-facing changes?

No.

# AI usage

Bug found and fix developed with Claude Code (Opus 5.5); I have reviewed
and understand the resulting code.
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.

PrimitiveDictionaryBuilder.finish should use actual value type

2 participants