Commit c134a84
authored
Explicitly declare spill codec dependency in
## Which issue does this PR close?
* Closes #21914.
---
## Rationale for this change
The spill subsystem implicitly relied on workspace-level Cargo feature
unification for codec support (e.g., `arrow-ipc/zstd`). This created a
fragile setup where changes in unrelated dependencies or feature flags
could silently break spill compression.
This PR establishes an explicit, crate-local contract for codec
availability, improving correctness, maintainability, and visibility of
dependencies.
---
## What changes are included in this PR?
* Add an explicit `arrow-ipc` dependency with `lz4` and `zstd` features
in `datafusion-physical-plan` to ensure required codecs are always
available.
* Document the codec contract directly in `IPCStreamWriter::new`,
clarifying expectations and failure modes.
* Update compression handling:
* Convert `SpillCompression` into `Option<CompressionType>` before
passing to `try_with_compression`.
* Rename parameter `compression_type` → `spill_compression` for clarity.
* Add `arrow-ipc` as a dependency in the workspace lockfile.
* Minor cleanup:
* Adjust `cargo-machete` ignored field to array format.
* Improve comments around `serde_json` usage.
---
## Are these changes tested?
No new tests are included in this PR.
The changes rely on existing spill-related tests. No modifications to
tests were made in this diff.
---
## Are there any user-facing changes?
No direct user-facing changes.
This PR improves internal reliability and makes spill compression
behavior more robust against dependency or feature configuration
changes.
---
## LLM-generated code disclosure
This PR includes LLM-generated code and comments. All LLM-generated
content has been manually reviewed and tested.physical-plan (#21917)1 parent 7d107f0 commit c134a84
5 files changed
Lines changed: 26 additions & 8 deletions
File tree
- datafusion-cli
- datafusion
- physical-plan
- src/spill
- sqllogictest
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
293 | 305 | | |
294 | 306 | | |
295 | 307 | | |
296 | | - | |
| 308 | + | |
297 | 309 | | |
298 | 310 | | |
299 | 311 | | |
| |||
308 | 320 | | |
309 | 321 | | |
310 | 322 | | |
311 | | - | |
| 323 | + | |
| 324 | + | |
312 | 325 | | |
313 | 326 | | |
314 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
0 commit comments