Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-convert-to-delta
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyler authored Oct 18, 2023
2 parents aa514b0 + 3bcc428 commit 4e9671e
Show file tree
Hide file tree
Showing 10 changed files with 1,103 additions and 52 deletions.
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake-python"
version = "0.11.0"
version = "0.12.0"
authors = ["Qingping Hou <dave2008713@gmail.com>", "Will Jones <willjones127@gmail.com>"]
homepage = "https://github.com/delta-io/delta-rs"
license = "Apache-2.0"
Expand Down
19 changes: 19 additions & 0 deletions python/deltalake/_internal.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,25 @@ class RawDeltaTable:
writer_properties: Optional[Dict[str, int]],
safe_cast: bool = False,
) -> str: ...
def merge_execute(
self,
source: pa.RecordBatchReader,
predicate: str,
source_alias: Optional[str],
target_alias: Optional[str],
writer_properties: Optional[Dict[str, int | None]],
safe_cast: bool,
matched_update_updates: Optional[Dict[str, str]],
matched_update_predicate: Optional[str],
matched_delete_predicate: Optional[str],
matched_delete_all: Optional[bool],
not_matched_insert_updates: Optional[Dict[str, str]],
not_matched_insert_predicate: Optional[str],
not_matched_by_source_update_updates: Optional[Dict[str, str]],
not_matched_by_source_update_predicate: Optional[str],
not_matched_by_source_delete_predicate: Optional[str],
not_matched_by_source_delete_all: Optional[bool],
) -> str: ...
def get_active_partitions(
self, partitions_filters: Optional[FilterType] = None
) -> Any: ...
Expand Down
4 changes: 2 additions & 2 deletions python/deltalake/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ def encode_partition_value(val: Any) -> str:
return val
elif isinstance(val, (int, float)):
return str(val)
elif isinstance(val, date):
return val.isoformat()
elif isinstance(val, datetime):
return val.isoformat(sep=" ")
elif isinstance(val, date):
return val.isoformat()
elif isinstance(val, bytes):
return val.decode("unicode_escape", "backslashreplace")
else:
Expand Down
Loading

0 comments on commit 4e9671e

Please sign in to comment.