Skip to content

Commit 8003d2d

Browse files
committed
setup scaffolding for RollingManifestWriter
1 parent 4b91105 commit 8003d2d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pyiceberg/manifest.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from types import TracebackType
2323
from typing import (
2424
Any,
25+
Callable,
2526
Dict,
2627
Iterator,
2728
List,
@@ -763,6 +764,20 @@ def add_entry(self, entry: ManifestEntry) -> ManifestWriter:
763764
return self
764765

765766

767+
class RollingManifestWriter:
768+
_current_writer: ManifestWriter
769+
_supplier: Callable[[], ManifestWriter]
770+
771+
def __init__(self, supplier: Callable[[], ManifestWriter], target_file_size_in_bytes, target_number_of_rows) -> None:
772+
pass
773+
774+
def _should_roll_to_new_file(self) -> bool: ...
775+
776+
def to_manifest_files(self) -> list[ManifestFile]: ...
777+
778+
def add_entry(self, entry: ManifestEntry) -> RollingManifestWriter: ...
779+
780+
766781
class ManifestWriterV1(ManifestWriter):
767782
def __init__(self, spec: PartitionSpec, schema: Schema, output_file: OutputFile, snapshot_id: int):
768783
super().__init__(

0 commit comments

Comments
 (0)