thswlsqls opened a new pull request, #8758:
URL: https://github.com/apache/paimon/pull/8758

   
   ### Purpose
   
   fix #8757
   
   - `ArrowFieldWriterFactoryVisitor` passed the parent field's `isNullable` to 
ARRAY/VECTOR/MAP/ROW sub writers, and `ArrowFieldWriter.write` rejects null 
with `IllegalArgumentException` when that flag is false. An `ARRAY<INT> NOT 
NULL` column therefore rejected valid null elements, while a NOT NULL child 
under a nullable parent silently accepted nulls.
   - Each sub writer now uses its own type's `isNullable()`, matching the child 
nullability `ArrowUtils.toArrowField()` declares.
   - Same rule applied to `ArrowUtils.createArrowFieldWriters()` (test-only 
caller).
   - Map keys follow the key type; `toArrowField()` declares the Arrow key 
field not-null, left as a follow-up.
   - Follow-up of #5538, which fixed only `ArrowFormatWriter`.
   
   ### Tests
   
   - Added four `ArrowFormatWriterTest` cases covering null children under NOT 
NULL ARRAY/MAP columns and NOT NULL ARRAY elements / nested ROW fields. All 
four fail before the change.
   - `mvn -pl paimon-arrow -am clean install` — 52 tests passed.
   - `mvn -pl paimon-core -Dtest=ArrowBatchConverterTest test` — 21 tests 
passed.
   


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