Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/deltalake/writer/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def write_deltalake(
configuration: A map containing configuration options for the metadata action.
schema_mode: If set to "overwrite", allows replacing the schema of the table. Set to "merge" to merge with existing schema.
storage_options: options passed to the native delta filesystem.
predicate: When using `Overwrite` mode, replace data that matches a predicate. Only used in rust engine.'
predicate: When using `Overwrite` mode, replace data that matches a predicate.'
target_file_size: Override for target file size for data files written to the delta table. If not passed, it's taken from `delta.targetFileSize`.
writer_properties: Pass writer properties to the Rust parquet writer.
post_commithook_properties: properties for the post commit hook. If None, default values are used.
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ignore = ["E501", "ANN401", "RUF040"]
known-first-party = ["deltalake"]

[tool.pytest.ini_options]
addopts = "-v -m 'not integration and not benchmark and not no_pyarrow'"
addopts = "-v -x -m 'not integration and not benchmark and not no_pyarrow'"
testpaths = ["tests", "deltalake"]
markers = [
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
Expand Down
46 changes: 46 additions & 0 deletions python/tests/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2510,3 +2510,49 @@ def test_tilde_path_works_with_writes():
expanded_path = os.path.expanduser(tilde_path)
if os.path.exists(expanded_path):
shutil.rmtree(expanded_path)


@pytest.mark.pyarrow
def test_dots_in_column_names_2624(tmp_path: pathlib.Path):
"""
<https://github.com/delta-io/delta-rs/issues/2624>
"""
import pyarrow as pa
initial = pa.Table.from_pydict(
{
"Product.Id": ['x-0', 'x-1', 'x-2', 'x-3'],
'Cost' : [10, 11, 12, 13],
}
)

write_deltalake(
table_or_uri=tmp_path,
data=initial,
partition_by=["Product.Id"],
)

update = pa.Table.from_pydict(
{
"Product.Id": ['x-1'],
'Cost' : [101],
}
)

write_deltalake(
table_or_uri=tmp_path,
data=update,
partition_by=["Product.Id"],
mode="overwrite",
predicate="\"Product.Id\" = 'x-1'"
)

dt = DeltaTable(tmp_path)
expected = pa.Table.from_pydict(
{
"Product.Id": ['x-0', 'x-1', 'x-2', 'x-3'],
'Cost' : [10, 101, 12, 13],
}
)
# Sorting just to make sure the equivalency matches up
actual = dt.to_pyarrow_table().sort_by('Product.Id')
assert expected == actual
Loading