kevinjqliu commented on code in PR #2215: URL: https://github.com/apache/iceberg-python/pull/2215#discussion_r2208730847
########## pyiceberg/utils/schema_conversion.py: ########## @@ -68,8 +68,9 @@ LOGICAL_FIELD_TYPE_MAPPING: Dict[Tuple[str, str], PrimitiveType] = { ("date", "int"): DateType(), + ("time-millis", "int"): TimeType(), ("time-micros", "long"): TimeType(), - ("timestamp-millis", "int"): TimestampType(), + ("timestamp-millis", "long"): TimestampType(), Review Comment: good catch! heres the corresponding type conversion for `timestamp-millis` in java https://github.com/apache/iceberg/blob/d3d5662aee19dd1799fd12740c64eadcb7f8da8b/core/src/main/java/org/apache/iceberg/avro/GenericAvroReader.java#L184-L187 I see `time-micros` but I dont see `time-millis` in here though ########## tests/utils/test_schema_conversion.py: ########## @@ -341,8 +342,20 @@ def test_convert_uuid_fixed_type() -> None: assert actual == UUIDType() +def test_convert_time_millis_type() -> None: + avro_logical_type = {"type": "int", "logicalType": "time-millis"} + actual = AvroSchemaConversion()._convert_logical_type(avro_logical_type) + assert actual == TimeType() Review Comment: i wonder if theres a better way to test these type conversions.. -- 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