hutiefang76 opened a new pull request, #1292:
URL: https://github.com/apache/arrow-java/pull/1292

   ## What's Changed
   
   Appending to a newly created `UnionVector` repeatedly reallocates its type 
buffer until allocation fails: its value capacity remains zero until it has 
child vectors. Check the type buffer capacity at this stage, since the existing 
append loop creates and expands the child vectors afterward.
   
   The regression appends two floats to an empty union with a bounded 
allocator. It fails before the change with an allocation error and passes 
afterward. All 32 `TestVectorAppender` tests pass with both the Netty and 
Unsafe allocators on JDK 21. Checkstyle and Spotless also pass.
   
   Closes #812.
   
   Validation (JDK 21):
   
   ```sh
   mvn -B -pl vector -am test -Dtest=TestVectorAppender 
-Dsurefire.failIfNoSpecifiedTests=false
   mvn -B -pl vector spotless:check
   ```
   
   Developed with AI assistance; the regression was verified to fail before the 
fix and pass afterward.
   


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