Skip to content

Commit

Permalink
setup scaffolding for RollingManifestWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
felixscherz committed Apr 15, 2024
1 parent 4b91105 commit 8003d2d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pyiceberg/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from types import TracebackType
from typing import (
Any,
Callable,
Dict,
Iterator,
List,
Expand Down Expand Up @@ -763,6 +764,20 @@ def add_entry(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

0 comments on commit 8003d2d

Please sign in to comment.