Skip to content

Commit 14c18ec

Browse files
authored
fix: Enable arrow-ipc/zstd in datasource-arrow to make test_spill_compression pass in every config (#21504)
## Which issue does this PR close? - Closes #21503. ## Rationale for this change The spill manager assumes that all available compressions are actually available, which currently relies on feature unification with `datafusion-datasource-arrow`. ## What changes are included in this PR? Move `arrow-ipc/zstd` feature from `datafusion-datasource-arrow` to the workspace dependency, like lz4. ## Are these changes tested? Existing tests cover the functionality, tested individual crates locally. ## Are there any user-facing changes? Shifts some features around which might change behavior for users for DataFusion, not sure how the project reasons about this level of changes.
1 parent fd093fb commit 14c18ec

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,11 @@ arrow-data = { version = "58.1.0", default-features = false }
104104
arrow-flight = { version = "58.1.0", features = [
105105
"flight-sql-experimental",
106106
] }
107+
# Both codecs are required here to make sure that code paths like
108+
# file-spilling have access to all compression codecs.
107109
arrow-ipc = { version = "58.1.0", default-features = false, features = [
108110
"lz4",
111+
"zstd",
109112
] }
110113
arrow-ord = { version = "58.1.0", default-features = false }
111114
arrow-schema = { version = "58.1.0", default-features = false }

datafusion/datasource-arrow/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ name = "datafusion_datasource_arrow"
6262
path = "src/mod.rs"
6363

6464
[features]
65-
compression = [
66-
"arrow-ipc/zstd",
67-
]
65+
# This feature is deprecated, as core functionality in the SpillManager requires all features
66+
# it enabled, and will be removed in a future version.
67+
compression = []

datafusion/datasource-arrow/src/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
2222

2323
//! [`ArrowFormat`]: Apache Arrow file format abstractions
24+
//!
25+
//! Note: As of DataFusion 54.0.0, the `compression` feature of this crate
26+
//! is a no-op, only kept for backwards compatibility purposes, and it will
27+
//! be removed in a future release.
2428
2529
pub mod file_format;
2630
pub mod source;

0 commit comments

Comments
 (0)