File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 7272 ("timestamp-millis" , "int" ): TimestampType (),
7373 ("timestamp-micros" , "long" ): TimestampType (),
7474 ("uuid" , "fixed" ): UUIDType (),
75+ ("uuid" , "string" ): UUIDType (),
7576}
7677
7778AvroType = Union [str , Any ]
Original file line number Diff line number Diff line change 3434 StringType ,
3535 StructType ,
3636 TimestampType ,
37+ UUIDType ,
3738 UnknownType ,
3839)
3940from pyiceberg .utils .schema_conversion import AvroSchemaConversion
@@ -327,13 +328,21 @@ def test_convert_date_type() -> None:
327328 actual = AvroSchemaConversion ()._convert_logical_type (avro_logical_type )
328329 assert actual == DateType ()
329330
331+ def test_convert_uuid_str_type () -> None :
332+ avro_logical_type = {"type" : "string" , "logicalType" : "uuid" }
333+ actual = AvroSchemaConversion ()._convert_logical_type (avro_logical_type )
334+ assert actual == UUIDType ()
335+
336+ def test_convert_uuid_fixed_type () -> None :
337+ avro_logical_type = {"type" : "fixed" , "logicalType" : "uuid" }
338+ actual = AvroSchemaConversion ()._convert_logical_type (avro_logical_type )
339+ assert actual == UUIDType ()
330340
331341def test_convert_timestamp_millis_type () -> None :
332342 avro_logical_type = {"type" : "int" , "logicalType" : "timestamp-millis" }
333343 actual = AvroSchemaConversion ()._convert_logical_type (avro_logical_type )
334344 assert actual == TimestampType ()
335345
336-
337346def test_convert_timestamp_micros_type () -> None :
338347 avro_logical_type = {"type" : "int" , "logicalType" : "timestamp-micros" }
339348 actual = AvroSchemaConversion ()._convert_logical_type (avro_logical_type )
You can’t perform that action at this time.
0 commit comments