Skip to content

Commit f2949b7

Browse files
committed
remove arrow schema cast
1 parent dceedfa commit f2949b7

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

pyiceberg/table/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,6 @@ def append(self, df: pa.Table, snapshot_properties: Dict[str, str] = EMPTY_DICT)
484484
_check_schema_compatible(
485485
self._table.schema(), other_schema=df.schema, downcast_ns_timestamp_to_us=downcast_ns_timestamp_to_us
486486
)
487-
# cast if the two schemas are compatible but not equal
488-
table_arrow_schema = self._table.schema().as_arrow()
489-
if table_arrow_schema != df.schema:
490-
df = df.cast(table_arrow_schema)
491487

492488
manifest_merge_enabled = PropertyUtil.property_as_bool(
493489
self.table_metadata.properties,
@@ -545,10 +541,6 @@ def overwrite(
545541
_check_schema_compatible(
546542
self._table.schema(), other_schema=df.schema, downcast_ns_timestamp_to_us=downcast_ns_timestamp_to_us
547543
)
548-
# cast if the two schemas are compatible but not equal
549-
table_arrow_schema = self._table.schema().as_arrow()
550-
if table_arrow_schema != df.schema:
551-
df = df.cast(table_arrow_schema)
552544

553545
self.delete(delete_filter=overwrite_filter, snapshot_properties=snapshot_properties)
554546

0 commit comments

Comments
 (0)