fallintoplace opened a new pull request, #1079:
URL: https://github.com/apache/arrow-go/pull/1079

   ## Problem
   
   Schema.AddField used append directly on the parent field slice when adding 
at the end. If that slice had spare capacity, multiple schemas derived from the 
same parent shared the appended slot. Creating the second derived schema could 
silently replace a field in the first one.
   
   ## Change
   
   Always allocate the result field slice before inserting the new field. 
Derived schemas no longer share mutable backing storage with their parent or 
sibling schemas.
   
   ## Coverage
   
   The regression test builds enough fields to leave spare capacity, branches 
twice from the same schema, and verifies that the first derived schema keeps 
its field.
   
   ## Validation
   
   - go test ./arrow
   - go test -race ./arrow -run '^TestSchemaAddFieldDoesNotAliasParentStorage$' 
-count=1


-- 
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