Skip to content
Next Next commit
setup scaffolding for RollingManifestWriter
  • Loading branch information
felixscherz committed Aug 5, 2024
commit 88a19550ec7537a4b9822ecb7f8736ab2cc5cc90
15 changes: 15 additions & 0 deletions pyiceberg/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from types import TracebackType
from typing import (
Any,
Callable,
Dict,
Iterator,
List,
Expand Down Expand Up @@ -840,6 +841,20 @@ def existing(self, entry: ManifestEntry) -> ManifestWriter:
return self


class RollingManifestWriter:
_current_writer: ManifestWriter
_supplier: Callable[[], ManifestWriter]

def __init__(self, supplier: Callable[[], ManifestWriter], target_file_size_in_bytes, target_number_of_rows) -> None:
pass

def _should_roll_to_new_file(self) -> bool: ...

def to_manifest_files(self) -> list[ManifestFile]: ...

def add_entry(self, entry: ManifestEntry) -> RollingManifestWriter: ...


class ManifestWriterV1(ManifestWriter):
def __init__(self, spec: PartitionSpec, schema: Schema, output_file: OutputFile, snapshot_id: int):
super().__init__(
Expand Down