dmgcodevil opened a new issue, #6587: URL: https://github.com/apache/iceberg/issues/6587
### Apache Iceberg version None ### Query engine None ### Please describe the bug 🐞 I have a timestamp field of type: `timestamptz`. I'm trying to compact files using Spark action but getting the following error: ``` Wrong class, java.lang.Long, for object: 19367 ``` My schema: ``` { "id" : 10, "name" : "tick_timestamp", "required" : false, "type" : "timestamptz" }, { "id" : 11, "name" : "transaction_timestamp", "required" : false, "type" : "timestamptz" } ``` Partition specs: ```json "partition-spec" : [ { "name" : "transaction_timestamp_day", "transform" : "void", "source-id" : 11, "field-id" : 1000 }, { "name" : "id059_bucket", "transform" : "bucket[20]", "source-id" : 5, "field-id" : 1001 }, { "name" : "tick_timestamp_day", "transform" : "day", "source-id" : 10, "field-id" : 1002 } ], "default-spec-id" : 2, "partition-specs" : [ { "spec-id" : 0, "fields" : [ { "name" : "transaction_timestamp_day", "transform" : "day", "source-id" : 11, "field-id" : 1000 }, { "name" : "id059_bucket", "transform" : "bucket[20]", "source-id" : 5, "field-id" : 1001 } ] }, { "spec-id" : 1, "fields" : [ { "name" : "tick_timestamp_day", "transform" : "day", "source-id" : 11, "field-id" : 1000 }, { "name" : "id059_bucket", "transform" : "bucket[20]", "source-id" : 5, "field-id" : 1001 } ] }, { "spec-id" : 2, "fields" : [ { "name" : "transaction_timestamp_day", "transform" : "void", "source-id" : 11, "field-id" : 1000 }, { "name" : "id059_bucket", "transform" : "bucket[20]", "source-id" : 5, "field-id" : 1001 }, { "name" : "tick_timestamp_day", "transform" : "day", "source-id" : 10, "field-id" : 1002 } ] } ] ``` Test: ```java val task = table.newScan().filter().planFiles().asScala.head Comparators.forType(table.spec.partitionType()).compare(task.file().partition(), task.file().partition()) ``` Error: ``` Wrong class, java.lang.Long, for object: 19367 ``` The one thing I noticed is that `` returns the following type: ``` {"type":"record","name":"PartitionData","namespace":"org.apache.iceberg","fields":[{"name":"tick_timestamp_day","type":["null",{"type":"int","logicalType":"date"}],"default":null,"field-id":1000},{"name":"id059_bucket","type":["null","int"],"default":null,"field-id":1001}]} ``` `tick_timestamp_day` has type `date` (int) instead of `timestamptz`. Any thoughts ? -- 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-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org