Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter committed Jul 10, 2023
1 parent bf1e061 commit 3a17af6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions dask_deltatable/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
get_partitions_from_path,
try_get_table_and_table_uri,
)
from pyarrow.lib import RecordBatchReader
from toolz.itertoolz import pluck

from ._schema import validate_compatible
Expand Down Expand Up @@ -101,7 +100,7 @@ def to_deltalake(
raise DeltaProtocolError(
"This table's min_writer_version is "
f"{table.protocol().min_writer_version}, "
"but this method only supports version 2."
f"but this method only supports version {MAX_SUPPORTED_WRITER_VERSION}."
)
else: # creating a new table
current_version = -1
Expand All @@ -116,7 +115,7 @@ def to_deltalake(
partitioning = None
if mode == "overwrite":
# FIXME: There are a couple of checks that are not migrated yet
raise NotImplementedError()
raise NotImplementedError("mode='overwrite' is not implemented")

written = df.map_partitions(
_write_partition,
Expand Down Expand Up @@ -248,7 +247,7 @@ def visitor(written_file: Any) -> None:
format="parquet",
partitioning=partitioning,
# It will not accept a schema if using a RBR
schema=schema if not isinstance(data, RecordBatchReader) else None,
schema=schema,
existing_data_behavior="overwrite_or_ignore",
file_options=file_options,
max_open_files=max_open_files,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_roundtrip(tmpdir, with_index):
dtypes=dtypes,
)
# FIXME: us is the only precision delta supports. This lib should likely
# case this itself
# cast this itself

ddf = ddf.reset_index()
ddf.timestamp = ddf.timestamp.astype("datetime64[us]")
Expand Down

0 comments on commit 3a17af6

Please sign in to comment.