vinishjail97 opened a new issue, #975:
URL: https://github.com/apache/incubator-xtable/issues/975

   ### Please describe the bug 🐞
   
   When Paimon is the source, a table partitioned by a non-STRING column fails 
to sync to Delta and Iceberg.
   
   `PaimonPartitionExtractor.toPartitionValues` builds the partition values 
from `InternalRowPartitionComputer.generatePartValues`, which returns the path 
strings (for example `"2019-10-12"`). Every partition value therefore reaches 
the targets as a `String`, while the targets expect the typed form that the 
Delta and Iceberg sources produce (an `Integer` epoch day for DATE, an 
`Integer` for INT, a `Long` for BIGINT).
   
   For a DATE partition, both targets fail:
   
   ```
   ERROR org.apache.xtable.spi.sync.TableFormatSync - Failed to sync snapshot
   java.lang.ClassCastException: Cannot cast java.lang.String to 
java.lang.Integer
   ```
   
   A null partition value also arrives as the string `__DEFAULT_PARTITION__` 
instead of null.
   
   **To reproduce**
   
   1. Create a Paimon table with a `DATE` partition column, for example `dt`.
   2. Write a few rows.
   3. Sync it to Delta or Iceberg.
   
   **Expected behavior**
   
   The sync succeeds, and the target partition values match the source.
   
   Originally reported in #869 by @yyangAtlassian.
   


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