Skip to content

Commit

Permalink
remove arrow df cast
Browse files Browse the repository at this point in the history
  • Loading branch information
jqin61 committed Jul 16, 2024
1 parent 41e77fa commit 05740ff
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pyiceberg/table/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,6 @@ def dynamic_overwrite(self, df: pa.Table, snapshot_properties: Dict[str, str] =

_check_schema_compatible(self._table.schema(), other_schema=df.schema)

# cast if the two schemas are compatible but not equal
table_arrow_schema = self._table.schema().as_arrow()
if table_arrow_schema != df.schema:
df = df.cast(table_arrow_schema)

# If dataframe does not have data, there is no need to overwrite
if df.shape[0] == 0:
return
Expand Down

0 comments on commit 05740ff

Please sign in to comment.