abacef commented on issue #7798:
URL: https://github.com/apache/arrow-rs/issues/7798#issuecomment-3034644808

   Ok I think I see the issue, you are saying for example you have 
   
   ```
   let mut variant = VariantBuilder::new();
   
   let mut parent_object_builder = variant.new_object();
   
   let mut child_object_builder1 = parent_object_builder.new_object();
   ...
   let mut child_object_builder2 = parent_object_builder.new_object();
   ...
   
   ```
   
   and lets say we for got to put `self.check_pending_field();` as the first 
line of `ObjectBuilder::new_object()`, that would mean `child_object_builder1` 
would get put in the `parent_object_builder.pending` field. Then when the 
`parent_object_builder.new_object()` is called to build `child_object_builder2` 
the `parent_object_builder.pending` is overwritten with the pending field name 
of the new field for child object 2 so it never gets `self.fields.insert()` 
called on it making the `child_object1` not get created correctly/missing, so 
in the same function scope that it gets overwritten, it gets `drop`ped, so we 
can just run the `check_pending_field` it when it gets dropped/overwritten
   
   Seems kind of a workaround, but it may work


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