Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Mar 20, 2024
1 parent 9a13925 commit 0582b4b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
16 changes: 15 additions & 1 deletion daft/daft.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import builtins
from enum import Enum
from typing import Any, Callable
from typing import Any, Callable, TYPE_CHECKING

from daft.runners.partitioning import PartitionCacheEntry
from daft.execution import physical_plan
from daft.plan_scheduler.physical_plan_scheduler import PartitionT
import pyarrow
from daft.io.scan import ScanOperator

if TYPE_CHECKING:
from pyiceberg.schema import Schema as IcebergSchema
from pyiceberg.table import TableProperties as IcebergTableProperties

class ImageMode(Enum):
"""
Supported image modes for Daft's image type.
Expand Down Expand Up @@ -1239,6 +1243,16 @@ class LogicalPlanBuilder:
compression: str | None = None,
io_config: IOConfig | None = None,
) -> LogicalPlanBuilder: ...
def iceberg_write(
self,
table_name: str,
table_location: str,
spec_id: int,
iceberg_schema: IcebergSchema,
iceberg_properties: IcebergTableProperties,
catalog_columns: list[str],
io_config: IOConfig | None = None,
) -> LogicalPlanBuilder: ...
def schema(self) -> PySchema: ...
def optimize(self) -> LogicalPlanBuilder: ...
def to_physical_plan_scheduler(self, cfg: PyDaftExecutionConfig) -> PhysicalPlanScheduler: ...
Expand Down
2 changes: 1 addition & 1 deletion daft/dataframe/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ def write_iceberg(self, table: "IcebergTable", mode: str = "append") -> "DataFra

import pyiceberg
from packaging.version import parse

if parse(pyiceberg.__version__) < parse("0.6.0"):
raise ValueError(f"Write Iceberg is only supported on pyiceberg>=0.6.0, found {pyiceberg.__version__}")


from pyiceberg.table import _MergingSnapshotProducer
from pyiceberg.table.snapshots import Operation

Expand Down
1 change: 1 addition & 0 deletions daft/execution/execution_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ def _handle_file_write(self, input: MicroPartition) -> MicroPartition:
io_config=self.io_config,
)


@dataclass(frozen=True)
class WriteIceberg(SingleOutputInstruction):
base_path: str
Expand Down

0 comments on commit 0582b4b

Please sign in to comment.