2dmurali opened a new pull request, #17944:
URL: https://github.com/apache/iceberg/pull/17944

   ### Problem
   
   The default Parquet Avro writer registers `VariantConversion`, but 
conversion lookup does not recognize implementations of the `Variant` interface.
   
   Values created using `Variant.of(...)` have the runtime type `VariantData`. 
Avro's exact-class conversion lookup therefore misses the conversion registered 
for `Variant.class` and attempts to handle the value as an `IndexedRecord`, 
causing a `ClassCastException`.
   
   ### Changes
   
   - Use `VariantConversion` for logical Variant values whose runtime classes 
implement `Variant`.
   - Add a regression test that writes a `GenericData.Record` through the 
default Parquet writer and verifies the Variant value after reading it back.
   
   ### Testing
   
   - `./gradlew :iceberg-parquet:test`
   - `./gradlew spotlessCheck`
   - `./gradlew build -x test -x integrationTest`
   - Manually reproduced the failure and verified the fix using the Iceberg 
Spark 4.0 runtime.
   
   Closes #17943
   
   


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