Wire finish_preserve_values through ArrayBuilder trait#9601
Open
adamreichold wants to merge 1 commit intoapache:mainfrom
Open
Wire finish_preserve_values through ArrayBuilder trait#9601adamreichold wants to merge 1 commit intoapache:mainfrom
adamreichold wants to merge 1 commit intoapache:mainfrom
Conversation
To support delta dictionaries for nested builders, this adds a new method finish_preserve_values to the ArrayBuilder trait and wires it through to the relevant dictionary and composite builders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Delta dictionaries require user code to call
finish_preserve_valuesinstead offinishon 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_valuestoArrayBuilderwith a default implementation that forwards tofinish.Implements this method for dictionary and composite builders.
Are these changes tested?
Adds tests where new
finish_preserve_valuesinherent methods were created to check that the correct method on the constituent builders is called using a shared mock builderPreserveValuesMock.Are there any user-facing changes?
This adds a new method
finish_preserve_valuesto the centralArrayBuildertrait, but it has a default implementation so this should be backwards compatible.