Skip to content

[59_maintenance] fix: finish methods in PrimitiveDictionaryBuilder discard type params - #11442

Merged
alamb merged 1 commit into
apache:59_maintenancefrom
Jefffrey:backport_11327
Oct 8, 2026
Merged

alamb merged 1 commit into
apache:59_maintenancefrom
Jefffrey:backport_11327

Conversation

@Jefffrey

@Jefffrey Jefffrey commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

…ms (apache#11327)

# Which issue does this PR close?

- Relates to apache#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 apache#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.
@Jefffrey Jefffrey added the bug Squash those bugs label Oct 8, 2026
@github-actions github-actions Bot added arrow Changes to the arrow crate arrow-array labels Oct 8, 2026

@mbutrovich mbutrovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a clean cherry-pick. LGTM FWIW, thanks @Jefffrey!

@alamb

alamb commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Same thing here -- https://github.com/apache/arrow-rs/actions/runs/37751897012/job/113226896460?pr=11442 seems unrelated to this PR. I will fix it in another PR and merge this one

@alamb
alamb merged commit 12440dc into apache:59_maintenance Oct 8, 2026
29 of 31 checks passed
@Jefffrey
Jefffrey deleted the backport_11327 branch October 9, 2026 02:39
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 arrow-array bug Squash those bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants