pola-rs/polars · error
The crate was compiled without IPC compression. Use `io_ipc_
Error message
The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC.
What it means
panic in polars-arrow's IPC writer: compress_lz4 (or zstd) was called but the crate was compiled without the io_ipc_compression feature, so the function is a stub that panics. Rebuild polars-arrow with the feature enabled or write uncompressed IPC.
Source
Thrown at crates/polars-arrow/src/io/ipc/compression.rs:67
}
#[cfg(feature = "io_ipc_compression")]
#[cfg_attr(docsrs, doc(cfg(feature = "io_ipc_compression")))]
pub fn compress_zstd(
input_buf: &[u8],
output_buf: &mut (impl std::io::Write + ?Sized),
level: ZstdLevel,
) -> PolarsResult<()> {
zstd::stream::copy_encode(input_buf, output_buf, level.compression_level())
.map_err(|e| e.into())
}
#[cfg(not(feature = "io_ipc_compression"))]
pub fn compress_lz4(
_input_buf: &[u8],
_output_buf: &mut (impl std::io::Write + ?Sized),
) -> PolarsResult<()> {
panic!(
"The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC."
)
}
#[cfg(not(feature = "io_ipc_compression"))]
pub fn compress_zstd(
_input_buf: &[u8],
_output_buf: &mut (impl std::io::Write + ?Sized),
_level: ZstdLevel,
) -> PolarsResult<()> {
panic!(
"The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC."
)
}
#[cfg(test)]
mod tests {
use super::*;View on GitHub (pinned to 9b5d73fd00)
Solutions
- Enable the `io_ipc_compression` cargo feature on polars-arrow (and polars) so LZ4/Zstd IPC compression support is compiled in.
- Write the IPC file without compression (Compression::None) if you cannot enable the feature.
- Check that the feature is enabled in the top-level crate's feature flags, not only in a transitive dependency.
Defensive patterns
Strategy: fallback
When it happens
Trigger: This panic/expect fires when execution reaches an unguarded state described by: "The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC.". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.
Common situations: Encountered when input data or configuration does not meet the preconditions of the throwing code path ("The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC."). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.
AI-assisted analysis of pola-rs/polars@9b5d73fd00 (2026-08-19).
Data as JSON: /api/errors/d108c27ab25be89a.
Report an issue: GitHub.