adamreichold opened a new pull request, #9601:
URL: https://github.com/apache/arrow-rs/pull/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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to