|
46 | 46 | TimeReader, |
47 | 47 | TimestampReader, |
48 | 48 | TimestamptzReader, |
| 49 | + UnknownReader, |
49 | 50 | UUIDReader, |
50 | 51 | ) |
51 | 52 | from pyiceberg.avro.writer import ( |
|
66 | 67 | TimestamptzWriter, |
67 | 68 | TimestampWriter, |
68 | 69 | TimeWriter, |
| 70 | + UnknownWriter, |
69 | 71 | UUIDWriter, |
70 | 72 | Writer, |
71 | 73 | ) |
|
100 | 102 | TimestampType, |
101 | 103 | TimestamptzType, |
102 | 104 | TimeType, |
| 105 | + UnknownType, |
103 | 106 | UUIDType, |
104 | 107 | ) |
105 | 108 |
|
@@ -193,6 +196,9 @@ def visit_uuid(self, uuid_type: UUIDType) -> Writer: |
193 | 196 | def visit_binary(self, binary_type: BinaryType) -> Writer: |
194 | 197 | return BinaryWriter() |
195 | 198 |
|
| 199 | + def visit_unknown(self, unknown_type: UnknownType) -> Writer: |
| 200 | + return UnknownWriter() |
| 201 | + |
196 | 202 |
|
197 | 203 | CONSTRUCT_WRITER_VISITOR = ConstructWriter() |
198 | 204 |
|
@@ -341,6 +347,9 @@ def visit_fixed(self, fixed_type: FixedType, partner: Optional[IcebergType]) -> |
341 | 347 | def visit_binary(self, binary_type: BinaryType, partner: Optional[IcebergType]) -> Writer: |
342 | 348 | return BinaryWriter() |
343 | 349 |
|
| 350 | + def visit_unknown(self, unknown_type: UnknownType, partner: Optional[IcebergType]) -> Writer: |
| 351 | + return UnknownWriter() |
| 352 | + |
344 | 353 |
|
345 | 354 | class ReadSchemaResolver(PrimitiveWithPartnerVisitor[IcebergType, Reader]): |
346 | 355 | __slots__ = ("read_types", "read_enums", "context") |
@@ -471,6 +480,9 @@ def visit_fixed(self, fixed_type: FixedType, partner: Optional[IcebergType]) -> |
471 | 480 | def visit_binary(self, binary_type: BinaryType, partner: Optional[IcebergType]) -> Reader: |
472 | 481 | return BinaryReader() |
473 | 482 |
|
| 483 | + def visit_unknown(self, unknown_type: UnknownType, partner: Optional[IcebergType]) -> Reader: |
| 484 | + return UnknownReader() |
| 485 | + |
474 | 486 |
|
475 | 487 | class SchemaPartnerAccessor(PartnerAccessor[IcebergType]): |
476 | 488 | def schema_partner(self, partner: Optional[IcebergType]) -> Optional[IcebergType]: |
|
0 commit comments