Fokko commented on code in PR #2173: URL: https://github.com/apache/iceberg-python/pull/2173#discussion_r2209391896
########## pyiceberg/utils/schema_conversion.py: ########## @@ -69,8 +69,10 @@ LOGICAL_FIELD_TYPE_MAPPING: Dict[Tuple[str, str], PrimitiveType] = { ("date", "int"): DateType(), ("time-micros", "long"): TimeType(), + ("timestamp-millis", "int"): TimestampType(), Review Comment: `TimestampType` is implied to be micros, since Iceberg initially only supported microsecond precision. With V3, we've added `TimestampNanoType`, but there is no notion of millisecond precision in the Iceberg specification. With this PR, we read the millis directly into micros (without doing a conversion from millis to micros). If we want to support this, I would expect some logic to convert millis to micros. This should probably take place with a [specialized reader](https://github.com/apache/iceberg-python/blob/ad8263b1be048c8cb67d40efe70f494a4f1cb374/pyiceberg/avro/reader.py#L170C7-L175). However, this would diverge PyIceberg from the other implementations, such as the reference [implementation in Java](https://github.com/apache/iceberg-python/pull/2215#discussion_r2208730847) as @kevinjqliu already pointed out. -- 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 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