Skip to content

Commit c0de522

Browse files
committed
Move tests, address, simplify schema function, added types to tes
1 parent 30fd7f1 commit c0de522

3 files changed

Lines changed: 327 additions & 354 deletions

File tree

pyiceberg/utils/schema_conversion.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
ICEBERG_FIELD_NAME_PROP,
3232
Schema,
3333
SchemaVisitorPerPrimitiveType,
34-
_valid_avro_name,
3534
make_compatible_name,
3635
visit,
3736
)
@@ -541,7 +540,7 @@ def field(self, field: NestedField, field_result: AvroType) -> AvroType:
541540
"type": field_result if field.required else ["null", field_result],
542541
}
543542

544-
if not is_valid_field_name:
543+
if orig_field_name != field_name:
545544
result[ICEBERG_FIELD_NAME_PROP] = orig_field_name
546545

547546
if field.write_default is not None:

tests/integration/test_avro_compatibility.py

Lines changed: 0 additions & 335 deletions
This file was deleted.

0 commit comments

Comments
 (0)