You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2023/01/10 16:59:51 UTC

[GitHub] [iceberg] rdblue commented on issue #6510: [Java API][BUG]When using the java iceberg api to write data into a partition table, an error occurs For a timestamp partition field, the type cannot be parsed correctly.

rdblue commented on issue #6510:
URL: https://github.com/apache/iceberg/issues/6510#issuecomment-1377570948

   The problem is in the call to `PartitionKey.partition`, where this assumes that the data value from the Generic object model can be used for a partition key. It can't because the two use different representations. Generics use Java 8 date/time classes and internals (manifest writers in this case) expect the long micros representation.
   
   You just need to wrap the record in `InternalRecordWrapper` when passing it to the `partition` method, which will convert between the different representations. You can reuse the wrapper.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org