Skip to content

Commit f3db466

Browse files
committed
remove deprecated functions
1 parent 9a6a9a1 commit f3db466

File tree

2 files changed

+0
-67
lines changed

2 files changed

+0
-67
lines changed

pyiceberg/io/pyarrow.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,23 +1679,6 @@ def project_batches(
16791679
total_row_count += len(batch)
16801680

16811681

1682-
@deprecated(
1683-
deprecated_in="0.7.0",
1684-
removed_in="0.8.0",
1685-
help_message="The public API for 'to_requested_schema' is deprecated and is replaced by '_to_requested_schema'",
1686-
)
1687-
def to_requested_schema(requested_schema: Schema, file_schema: Schema, table: pa.Table) -> pa.Table:
1688-
struct_array = visit_with_partner(requested_schema, table, ArrowProjectionVisitor(file_schema), ArrowAccessor(file_schema))
1689-
1690-
arrays = []
1691-
fields = []
1692-
for pos, field in enumerate(requested_schema.fields):
1693-
array = struct_array.field(pos)
1694-
arrays.append(array)
1695-
fields.append(pa.field(field.name, array.type, field.optional))
1696-
return pa.Table.from_arrays(arrays, schema=pa.schema(fields))
1697-
1698-
16991682
def _to_requested_schema(
17001683
requested_schema: Schema,
17011684
file_schema: Schema,

pyiceberg/table/__init__.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
from pyiceberg.table.update import (
9090
AddPartitionSpecUpdate,
9191
AddSchemaUpdate,
92-
AddSnapshotUpdate,
9392
AddSortOrderUpdate,
9493
AssertCreate,
9594
AssertRefSnapshotId,
@@ -314,55 +313,6 @@ def set_properties(self, properties: Properties = EMPTY_DICT, **kwargs: Any) ->
314313
updates = properties or kwargs
315314
return self._apply((SetPropertiesUpdate(updates=updates),))
316315

317-
@deprecated(
318-
deprecated_in="0.7.0",
319-
removed_in="0.8.0",
320-
help_message="Please use one of the functions in ManageSnapshots instead",
321-
)
322-
def add_snapshot(self, snapshot: Snapshot) -> Transaction:
323-
"""Add a new snapshot to the table.
324-
325-
Returns:
326-
The transaction with the add-snapshot staged.
327-
"""
328-
updates = (AddSnapshotUpdate(snapshot=snapshot),)
329-
330-
return self._apply(updates, ())
331-
332-
@deprecated(
333-
deprecated_in="0.7.0",
334-
removed_in="0.8.0",
335-
help_message="Please use one of the functions in ManageSnapshots instead",
336-
)
337-
def set_ref_snapshot(
338-
self,
339-
snapshot_id: int,
340-
parent_snapshot_id: Optional[int],
341-
ref_name: str,
342-
type: str,
343-
max_ref_age_ms: Optional[int] = None,
344-
max_snapshot_age_ms: Optional[int] = None,
345-
min_snapshots_to_keep: Optional[int] = None,
346-
) -> Transaction:
347-
"""Update a ref to a snapshot.
348-
349-
Returns:
350-
The transaction with the set-snapshot-ref staged
351-
"""
352-
updates = (
353-
SetSnapshotRefUpdate(
354-
snapshot_id=snapshot_id,
355-
ref_name=ref_name,
356-
type=type,
357-
max_ref_age_ms=max_ref_age_ms,
358-
max_snapshot_age_ms=max_snapshot_age_ms,
359-
min_snapshots_to_keep=min_snapshots_to_keep,
360-
),
361-
)
362-
363-
requirements = (AssertRefSnapshotId(snapshot_id=parent_snapshot_id, ref="main"),)
364-
return self._apply(updates, requirements)
365-
366316
def _set_ref_snapshot(
367317
self,
368318
snapshot_id: int,

0 commit comments

Comments
 (0)