Skip to content

Commit f370963

Browse files
committed
remove methods
1 parent cf8b46e commit f370963

File tree

2 files changed

+1
-55
lines changed

2 files changed

+1
-55
lines changed

pyiceberg/io/pyarrow.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
HDFS_KERB_TICKET,
101101
HDFS_PORT,
102102
HDFS_USER,
103-
PYARROW_USE_LARGE_TYPES_ON_READ,
104103
S3_ACCESS_KEY_ID,
105104
S3_ANONYMOUS,
106105
S3_CONNECT_TIMEOUT,
@@ -1756,14 +1755,6 @@ def to_table(self, tasks: Iterable[FileScanTask]) -> pa.Table:
17561755
(pa.Table.from_batches([batch]) for batch in itertools.chain([first_batch], batches)), promote_options="permissive"
17571756
)
17581757

1759-
if property_as_bool(self._io.properties, PYARROW_USE_LARGE_TYPES_ON_READ, False):
1760-
deprecation_message(
1761-
deprecated_in="0.10.0",
1762-
removed_in="0.11.0",
1763-
help_message=f"Property `{PYARROW_USE_LARGE_TYPES_ON_READ}` will be removed.",
1764-
)
1765-
result = result.cast(arrow_schema)
1766-
17671758
return result
17681759

17691760
def to_record_batches(self, tasks: Iterable[FileScanTask]) -> Iterator[pa.RecordBatch]:

pyiceberg/table/snapshots.py

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from pyiceberg.manifest import DataFile, DataFileContent, ManifestFile, _manifests
3030
from pyiceberg.partitioning import UNPARTITIONED_PARTITION_SPEC, PartitionSpec
3131
from pyiceberg.schema import Schema
32-
from pyiceberg.utils.deprecated import deprecation_message
3332

3433
if TYPE_CHECKING:
3534
from pyiceberg.table.metadata import TableMetadata
@@ -344,54 +343,10 @@ def _partition_summary(self, update_metrics: UpdateMetrics) -> str:
344343
return ",".join([f"{prop}={val}" for prop, val in update_metrics.to_dict().items()])
345344

346345

347-
def _truncate_table_summary(summary: Summary, previous_summary: Mapping[str, str]) -> Summary:
348-
for prop in {
349-
TOTAL_DATA_FILES,
350-
TOTAL_DELETE_FILES,
351-
TOTAL_RECORDS,
352-
TOTAL_FILE_SIZE,
353-
TOTAL_POSITION_DELETES,
354-
TOTAL_EQUALITY_DELETES,
355-
}:
356-
summary[prop] = "0"
357-
358-
def get_prop(prop: str) -> int:
359-
value = previous_summary.get(prop) or "0"
360-
try:
361-
return int(value)
362-
except ValueError as e:
363-
raise ValueError(f"Could not parse summary property {prop} to an int: {value}") from e
364-
365-
if value := get_prop(TOTAL_DATA_FILES):
366-
summary[DELETED_DATA_FILES] = str(value)
367-
if value := get_prop(TOTAL_DELETE_FILES):
368-
summary[REMOVED_DELETE_FILES] = str(value)
369-
if value := get_prop(TOTAL_RECORDS):
370-
summary[DELETED_RECORDS] = str(value)
371-
if value := get_prop(TOTAL_FILE_SIZE):
372-
summary[REMOVED_FILE_SIZE] = str(value)
373-
if value := get_prop(TOTAL_POSITION_DELETES):
374-
summary[REMOVED_POSITION_DELETES] = str(value)
375-
if value := get_prop(TOTAL_EQUALITY_DELETES):
376-
summary[REMOVED_EQUALITY_DELETES] = str(value)
377-
378-
return summary
379-
380-
381-
def update_snapshot_summaries(
382-
summary: Summary, previous_summary: Mapping[str, str] | None = None, truncate_full_table: bool = False
383-
) -> Summary:
346+
def update_snapshot_summaries(summary: Summary, previous_summary: Mapping[str, str] | None = None) -> Summary:
384347
if summary.operation not in {Operation.APPEND, Operation.OVERWRITE, Operation.DELETE}:
385348
raise ValueError(f"Operation not implemented: {summary.operation}")
386349

387-
if truncate_full_table and summary.operation == Operation.OVERWRITE and previous_summary is not None:
388-
deprecation_message(
389-
deprecated_in="0.10.0",
390-
removed_in="0.11.0",
391-
help_message="The truncate-full-table shouldn't be used.",
392-
)
393-
summary = _truncate_table_summary(summary, previous_summary)
394-
395350
if not previous_summary:
396351
previous_summary = {
397352
TOTAL_DATA_FILES: "0",

0 commit comments

Comments
 (0)