vinishjail97 opened a new pull request, #976:
URL: https://github.com/apache/incubator-xtable/pull/976

   ## *Important Read*
   - Fixes #975
   
   ## What is the purpose of the pull request
   
   The Paimon source passed every partition value to the targets as a `String`, 
so a Paimon table partitioned by a DATE column failed to sync to Delta and 
Iceberg with a `ClassCastException`. This pull request makes the Paimon source 
produce typed partition values, the same as the Delta and Iceberg sources. No 
target code changes.
   
   This takes over #869 from @yyangAtlassian, who found and reported the DATE 
failure. That PR fixed the cast in the Delta target. Fixing the source also 
covers the Iceberg target and the other non-STRING partition types, and the 
commit keeps @yyangAtlassian as a co-author.
   
   ## Brief change log
   
   - `PaimonPartitionExtractor.toPartitionValues` reads the typed value from 
the partition `BinaryRow` instead of using the path strings from 
`InternalRowPartitionComputer`.
   - It reuses the value reader in `PaimonStatsExtractor`, which is now 
package-private.
   - A null partition value is now `null` instead of the default partition name.
   - A partition type that has no reader now throws a `ReadException` instead 
of passing a wrong value.
   
   ## Verify this pull request
   
   This change added tests and can be verified as follows:
   
   - `TestPaimonPartitionExtractor#testToPartitionValuesWithTypedPartitionKeys` 
checks DATE, INT, and BIGINT partition values.
   - `ITConversionController#otherPaimonPartitionTypes` syncs a Paimon table 
partitioned by DATE, INT, and BIGINT columns to Iceberg and Delta in two 
incremental syncs, and compares the data and a partition filter query. It fails 
on main with the `ClassCastException` above.
   


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