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

fix: remove deprecated overwrite_schema configuration which has incorrect behavior #2554

Merged
merged 2 commits into from
May 29, 2024
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 crates/aws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.17.0", path = "../core" }
deltalake-core = { version = ">=0.17.0, <0.19.0", path = "../core" }
aws-smithy-runtime-api = { version="1.1.7" }
aws-smithy-runtime = { version="1.1.7", optional = true}
aws-credential-types = { version="1.1.7", features = ["hardcoded-credentials"]}
Expand Down
2 changes: 1 addition & 1 deletion crates/azure/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.17.0", path = "../core" }
deltalake-core = { version = ">=0.17.0, <0.19.0", path = "../core" }
lazy_static = "1"

# workspace depenndecies
Expand Down
2 changes: 1 addition & 1 deletion crates/catalog-glue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rust-version.workspace = true
async-trait = { workspace = true }
aws-config = "1"
aws-sdk-glue = "1"
deltalake-core = { version = "0.17.0", path = "../core" }
deltalake-core = { version = ">=0.17.0, <0.19.0", path = "../core" }
# This can depend on a lowest common denominator of core once that's released
# deltalake_core = { version = "0.17.0" }
thiserror = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake-core"
version = "0.17.3"
version = "0.18.0"
authors.workspace = true
keywords.workspace = true
readme.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/deltalake/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake"
version = "0.17.3"
version = "0.18.0"
authors.workspace = true
keywords.workspace = true
readme.workspace = true
Expand All @@ -17,7 +17,7 @@ rust-version.workspace = true
features = ["azure", "datafusion", "gcs", "hdfs", "json", "python", "s3", "unity-experimental"]

[dependencies]
deltalake-core = { version = "0.17.3", path = "../core" }
deltalake-core = { version = "~0.18.0", path = "../core" }
deltalake-aws = { version = "0.1.1", path = "../aws", default-features = false, optional = true }
deltalake-azure = { version = "0.1.1", path = "../azure", optional = true }
deltalake-gcp = { version = "0.2.1", path = "../gcp", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/gcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.17.0", path = "../core" }
deltalake-core = { version = ">=0.17.0, <0.19.0", path = "../core" }
lazy_static = "1"

# workspace depenndecies
Expand Down
2 changes: 1 addition & 1 deletion crates/mount/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.17.0", path = "../core", features = [
deltalake-core = { version = ">=0.17.0, <0.19.0", path = "../core", features = [
"datafusion",
] }
lazy_static = "1"
Expand Down
2 changes: 1 addition & 1 deletion crates/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish = false
[dependencies]
bytes = { workspace = true }
chrono = { workspace = true, default-features = false, features = ["clock"] }
deltalake-core = { version = "0.17.0", path = "../core" }
deltalake-core = { version = ">=0.17.0, <0.19.0", path = "../core" }
dotenvy = "0"
fs_extra = "1.3.0"
futures = { version = "0.3" }
Expand Down
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.17.5"
version = "0.18.0"
authors = ["Qingping Hou <[email protected]>", "Will Jones <[email protected]>"]
homepage = "https://github.com/delta-io/delta-rs"
license = "Apache-2.0"
Expand Down
15 changes: 0 additions & 15 deletions python/deltalake/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
else:
from typing_extensions import Literal

import warnings

import pyarrow as pa
import pyarrow.dataset as ds
import pyarrow.fs as pa_fs
Expand Down Expand Up @@ -106,7 +104,6 @@ def write_deltalake(
name: Optional[str] = ...,
description: Optional[str] = ...,
configuration: Optional[Mapping[str, Optional[str]]] = ...,
overwrite_schema: bool = ...,
schema_mode: Optional[Literal["overwrite"]] = ...,
storage_options: Optional[Dict[str, str]] = ...,
partition_filters: Optional[List[Tuple[str, str, Any]]] = ...,
Expand Down Expand Up @@ -134,7 +131,6 @@ def write_deltalake(
name: Optional[str] = ...,
description: Optional[str] = ...,
configuration: Optional[Mapping[str, Optional[str]]] = ...,
overwrite_schema: bool = ...,
schema_mode: Optional[Literal["merge", "overwrite"]] = ...,
storage_options: Optional[Dict[str, str]] = ...,
large_dtypes: bool = ...,
Expand Down Expand Up @@ -162,7 +158,6 @@ def write_deltalake(
name: Optional[str] = ...,
description: Optional[str] = ...,
configuration: Optional[Mapping[str, Optional[str]]] = ...,
overwrite_schema: bool = ...,
schema_mode: Optional[Literal["merge", "overwrite"]] = ...,
storage_options: Optional[Dict[str, str]] = ...,
predicate: Optional[str] = ...,
Expand Down Expand Up @@ -196,7 +191,6 @@ def write_deltalake(
name: Optional[str] = None,
description: Optional[str] = None,
configuration: Optional[Mapping[str, Optional[str]]] = None,
overwrite_schema: bool = False,
schema_mode: Optional[Literal["merge", "overwrite"]] = None,
storage_options: Optional[Dict[str, str]] = None,
partition_filters: Optional[List[Tuple[str, str, Any]]] = None,
Expand Down Expand Up @@ -251,7 +245,6 @@ def write_deltalake(
name: User-provided identifier for this table.
description: User-provided description for this table.
configuration: A map containing configuration options for the metadata action.
overwrite_schema: Deprecated, use schema_mode instead.
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.
Expand All @@ -269,14 +262,6 @@ def write_deltalake(
table.update_incremental()

__enforce_append_only(table=table, configuration=configuration, mode=mode)
if overwrite_schema:
schema_mode = "overwrite"

warnings.warn(
"overwrite_schema is deprecated, use schema_mode instead. ",
category=DeprecationWarning,
stacklevel=2,
)
if isinstance(partition_by, str):
partition_by = [partition_by]

Expand Down
Loading