Skip to content

Commit 7ba281a

Browse files
committed
feat: update comments and documentation in Cargo.toml and mod.rs
- Clarified spill codec comments in Cargo.toml:50 and Cargo.toml:99 to explain that arrow-ipc is consumed only via the arrow::ipc re-export, addressing potential unused flags from cargo-machete. - Revised writer doc comment in mod.rs:295 to specify "build-visible during Cargo feature resolution" instead of "compiler-visible." - Replaced bare commit hash reference with PR #21917 for clarity. - Added brief notes to the opportunistic serde_json cargo-machete cleanup in Cargo.toml:85 and Cargo.toml:97 to indicate they are unrelated to the spill contract.
1 parent 01df8f7 commit 7ba281a

4 files changed

Lines changed: 16 additions & 13 deletions

File tree

datafusion-cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ testcontainers-modules = { workspace = true, features = ["minio"] }
8282
# feature unification with dependencies
8383
serde_json = { workspace = true, features = ["preserve_order"] }
8484

85-
# Required because we pull serde_json with a feature to get consistent pg display,
86-
# but its not directly used.
85+
# Opportunistic cargo-machete cleanup: serde_json is pulled with a feature to get
86+
# consistent pg display, but is not directly used in this crate.
8787
[package.metadata.cargo-machete]
8888
ignored = ["serde_json"]

datafusion/physical-plan/Cargo.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ name = "datafusion_physical_plan"
4949
[dependencies]
5050
arrow = { workspace = true }
5151
arrow-data = { workspace = true }
52-
# Feature-only dep (arrow re-exports this crate as `arrow::ipc`): lz4 and zstd
53-
# codec support required by IPCStreamWriter in spill/mod.rs. These features must
54-
# stay in sync with the SpillCompression variants in datafusion-common. Declaring
55-
# the dependency here makes the contract explicit and local to the crate that owns
56-
# spill, preventing silent regressions if workspace-level arrow-ipc features are
57-
# narrowed (see commit 14c18ece4 for a prior regression caused by this coupling).
52+
# Feature-only dep used only via the `arrow::ipc` re-export (there is no direct
53+
# `use arrow_ipc` in this crate): lz4 and zstd codec support required by
54+
# IPCStreamWriter in spill/mod.rs. These features must stay in sync with the
55+
# SpillCompression variants in datafusion-common. Declaring the dependency here
56+
# makes the contract explicit and local to the crate that owns spill, preventing
57+
# silent regressions if workspace-level arrow-ipc features are narrowed (see
58+
# #21917 for the documented regression guard around this coupling).
5859
arrow-ipc = { workspace = true, features = ["lz4", "zstd"] }
5960
arrow-ord = { workspace = true }
6061
arrow-schema = { workspace = true }
@@ -94,7 +95,8 @@ tokio = { workspace = true, features = [
9495
"parking_lot",
9596
] }
9697

97-
# Required for spill compression codec support (see comment on arrow-ipc dependency above).
98+
# `arrow-ipc` is used only through the `arrow::ipc` re-export, so cargo-machete
99+
# reports it as unused even though this crate relies on its codec features.
98100
[package.metadata.cargo-machete]
99101
ignored = ["arrow-ipc"]
100102

datafusion/physical-plan/src/spill/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,9 @@ impl IPCStreamWriter {
298298
/// those features are absent, `try_with_compression` will return an
299299
/// error at runtime for [`SpillCompression::Lz4Frame`] and
300300
/// [`SpillCompression::Zstd`] variants. The Cargo dependency keeps this
301-
/// contract local and compiler-visible rather than relying solely on
302-
/// workspace-level feature unification.
301+
/// contract local and build-visible during Cargo feature resolution,
302+
/// rather than relying solely on workspace-level feature unification;
303+
/// see #21917.
303304
pub fn new(
304305
path: &Path,
305306
schema: &Schema,

datafusion/sqllogictest/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ harness = false
9494
name = "sqllogictests"
9595
path = "bin/sqllogictests.rs"
9696

97-
# Required because we pull serde_json with a feature to get consistent pg display,
98-
# but its not directly used.
97+
# Opportunistic cargo-machete cleanup: serde_json is pulled with a feature to get
98+
# consistent pg display, but is not directly used in this crate.
9999
[package.metadata.cargo-machete]
100100
ignored = ["serde_json"]

0 commit comments

Comments
 (0)