Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add comment to explain why assert has failed and show state #2179

Merged
Merged
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
10 changes: 6 additions & 4 deletions python/deltalake/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ def write_deltalake(
description=description,
configuration=configuration,
storage_options=storage_options,
writer_properties=writer_properties._to_dict()
if writer_properties
else None,
writer_properties=(
writer_properties._to_dict() if writer_properties else None
),
custom_metadata=custom_metadata,
)
if table:
Expand All @@ -336,7 +336,9 @@ def write_deltalake(
current_version = table.version()

if partition_by:
assert partition_by == table.metadata().partition_columns
assert (
partition_by == table.metadata().partition_columns
), f"Partition columns should be {table.metadata().partition_columns} but is {partition_by}"
else:
partition_by = table.metadata().partition_columns

Expand Down
Loading