Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed Dec 20, 2024
1 parent 644259e commit edff341
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions daft/dataframe/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,17 +870,12 @@ def write_deltalake(
from packaging.version import parse

from daft import from_pydict
from daft.dependencies import unity_catalog
from daft.filesystem import get_protocol_from_path
from daft.io import DataCatalogTable
from daft.io._deltalake import large_dtypes_kwargs
from daft.io.object_store_options import io_config_to_storage_options

_UNITY_AVAILABLE = True
try:
from daft.unity_catalog import UnityCatalogTable
except ImportError:
_UNITY_AVAILABLE = False

if schema_mode == "merge":
raise ValueError("Schema mode' merge' is not currently supported for write_deltalake.")

Expand All @@ -903,7 +898,7 @@ def write_deltalake(
table_uri = table
elif isinstance(table, pathlib.Path):
table_uri = str(table)
elif _UNITY_AVAILABLE and isinstance(table, UnityCatalogTable):
elif unity_catalog.module_available() and isinstance(table, unity_catalog.UnityCatalogTable):

Check warning on line 901 in daft/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

daft/dataframe/dataframe.py#L901

Added line #L901 was not covered by tests
table_uri = table.table_uri
io_config = table.io_config
elif isinstance(table, DataCatalogTable):

Check warning on line 904 in daft/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

daft/dataframe/dataframe.py#L904

Added line #L904 was not covered by tests
Expand Down

0 comments on commit edff341

Please sign in to comment.