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

   ### Purpose
   
   Fixes #11333.
   
   Fix reading external Avro string maps whose value encoding differs from 
Paimon's requested nullability or null-first union layout. Also avoid copying 
an encoded map into a destination with different value nullability, which 
produces invalid Avro output.
   
   Use the existing schema-aware reader for incompatible layouts and retain 
raw-byte reuse when the encoded value nullability matches the destination.
   
   ### Tests
   
   Added a real-file read/rewrite matrix using Avro's generic writer and reader 
as independent producers and consumers. It covers required values, nullable 
unions in both orders, nulls, empty maps, following fields and both directions 
of value-nullability changes. Four of six cases fail on the unchanged base; all 
six pass with the fix.
   
   Final verification: 85 tests passed, with no skips, using `mvn -pl 
paimon-format -am -DfailIfNoTests=false -DwildcardSuites=none 
-Dtest=AvroStringMapReadTest,AvroFileFormatTest,AvroFormatReadWriteTest,AvroBytesStringMapTest,AvroBlockReaderTest,AvroSimpleStatsExtractorLeakTest
 test` on JDK 11. Checkstyle, Spotless and Enforcer passed without 
`fast-build`; the repository-wide license check passed with `mvn -N 
apache-rat:check`.
   


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