We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dcc344 commit 05e7444Copy full SHA for 05e7444
1 file changed
pyiceberg/table/__init__.py
@@ -1147,8 +1147,6 @@ def overwrite(
1147
except ModuleNotFoundError as e:
1148
raise ModuleNotFoundError("For writes PyArrow needs to be installed") from e
1149
1150
- from pyiceberg.io.pyarrow import schema_to_pyarrow
1151
-
1152
if not isinstance(df, pa.Table):
1153
raise ValueError(f"Expected PyArrow table, got: {df}")
1154
@@ -1160,8 +1158,7 @@ def overwrite(
1160
1158
1161
1159
_check_schema(self.schema(), other_schema=df.schema)
1162
# safe to cast
1163
- pyarrow_schema = schema_to_pyarrow(self.schema())
1164
- df = df.cast(pyarrow_schema)
+ df = df.cast(self.schema().as_arrow())
1165
1166
with self.transaction() as txn:
1167
with txn.update_snapshot(snapshot_properties=snapshot_properties).overwrite() as update_snapshot:
0 commit comments