nssalian opened a new pull request, #15934:
URL: https://github.com/apache/iceberg/pull/15934

   ## Summary
   
   Fixes: https://github.com/apache/iceberg/issues/15933
   
   `ParquetAvroWriter.WriteBuilder` inherits `ParquetTypeVisitor.variant()` 
which returns `null`. For OPTIONAL variant fields, `struct()` wraps this null 
in `OptionWriter`, which dereferences `writer.columns()` resulting in an NPE
   
   ## Changes
   
   Override `variant()` to throw `UnsupportedOperationException`, similar to 
`primitive()` handles unsupported types in the same class.
   
   ## Test plan
   
   - Wrote a test to check the `UnsupportedOperationException` and ran it 
locally.
   - Removed the fix in `ParquetAvroWriter` and verified the NPE is 
reproducible. 


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to