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

   ## *Important Read*
   
   Closes #1048, part of #722.
   
   ## What is the purpose of the pull request
   
   Avro `local-timestamp-millis` and `local-timestamp-micros` convert to 
TIMESTAMP_NTZ with their precision instead of LONG, since Hudi 1.x writes them 
as Parquet timestamps not adjusted to UTC and Iceberg reads of such tables 
failed with a ClassCastException.
   
   ## Brief change log
   
   - `AvroSchemaConverter` maps both logical types to TIMESTAMP_NTZ.
   - The comparison helpers of `ITIcebergTableFormat` and 
`ITConversionController` read these columns as timestamps from Hudi, Iceberg 
and Delta.
   
   Known limitations:
   
   - **breaking for existing synced tables:** an Iceberg target that synced the 
column as long cannot promote it to timestamp, and a Delta target likely needs 
the `timestampNtz` table feature.
   - Hudi 0.x files store these columns as plain INT64, which Iceberg reads as 
micros, so millisecond values come back wrong.
   
   ## Verify this pull request
   
   This change added tests and can be verified as follows:
   
   - `TestAvroSchemaConverter` expects the new type, and a new case in 
`TestHudiSchemaExtractor` converts a Hudi schema with both logical types to the 
internal schema and on to Iceberg. `ITConversionController` and 
`ITIcebergTableFormat` compare the columns across formats.
   - Run locally on JDK 11: 597 `xtable-core` unit tests pass (3 skipped), all 
80 `ITConversionController` cases and the `xtable-core` Iceberg ITs pass, and 
the Iceberg table format's 26 unit tests and 46 ITs pass (1 skipped).
   


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