Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjqliu committed Mar 25, 2024
1 parent 5b553ab commit 5103d8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyiceberg/table/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ def append(self, df: pa.Table, snapshot_properties: Dict[str, str] = EMPTY_DICT)
raise ValueError("Cannot write to partitioned tables")

_check_schema_compatible(self.schema(), other_schema=df.schema)
# safe to cast
# the two schemas are compatible so safe to cast
df = df.cast(self.schema().as_arrow())

with self.transaction() as txn:
Expand Down Expand Up @@ -1167,7 +1167,7 @@ def overwrite(
raise ValueError("Cannot write to partitioned tables")

_check_schema_compatible(self.schema(), other_schema=df.schema)
# safe to cast
# the two schemas are compatible so safe to cast
df = df.cast(self.schema().as_arrow())

with self.transaction() as txn:
Expand Down

0 comments on commit 5103d8a

Please sign in to comment.