You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add finish_preserve_values to ArrayBuilder trait (#9601)
# Which issue does this PR close?
- Closes#9600.
# Rationale for this change
Delta dictionaries require user code to call `finish_preserve_values`
instead of `finish` on the dictionary builders. But this is generally
not possible if those builders are nested within composite builders like
lists, maps or structs. Using the new trait method, user code can call
this generically which has no effect on e.g. primitive builders due to
the default implementation but forwards to this method for composite
ones.
# What changes are included in this PR?
Adds a new method `finish_preserve_values` to `ArrayBuilder` with a
default implementation that forwards to `finish`.
Implements this method for dictionary and composite builders.
# Are these changes tested?
Adds tests where new `finish_preserve_values` inherent methods were
created to check that the correct method on the constituent builders is
called using a shared mock builder `PreserveValuesMock`.
# Are there any user-facing changes?
This adds a new method `finish_preserve_values` to the central
`ArrayBuilder` trait, but it has a default implementation so this should
be backwards compatible.
0 commit comments