pola-rs/polars · error
not implemented for {:?}
Error message
not implemented for {:?} What it means
Variant of the no_matching_dtype macro that operates on a Series ($self accessor dispatch); if the series' dtype matches no (feature-enabled) arm, it panics with 'not implemented for {:?}'. Means the operation lacks an implementation for that series dtype in this build.
Source
Thrown at crates/polars-core/src/utils/mod.rs:656
#[cfg(feature = "dtype-u16")]
DataType::UInt16 => $macro!($self.u16().unwrap() $(, $opt_args)*),
DataType::UInt32 => $macro!($self.u32().unwrap() $(, $opt_args)*),
DataType::UInt64 => $macro!($self.u64().unwrap() $(, $opt_args)*),
#[cfg(feature = "dtype-u128")]
DataType::UInt128 => $macro!($self.u128().unwrap() $(, $opt_args)*),
#[cfg(feature = "dtype-i8")]
DataType::Int8 => $macro!($self.i8().unwrap() $(, $opt_args)*),
#[cfg(feature = "dtype-i16")]
DataType::Int16 => $macro!($self.i16().unwrap() $(, $opt_args)*),
DataType::Int32 => $macro!($self.i32().unwrap() $(, $opt_args)*),
DataType::Int64 => $macro!($self.i64().unwrap() $(, $opt_args)*),
#[cfg(feature = "dtype-i128")]
DataType::Int128 => $macro!($self.i128().unwrap() $(, $opt_args)*),
#[cfg(feature = "dtype-f16")]
DataType::Float16 => $macro!($self.f16().unwrap() $(, $opt_args)*),
DataType::Float32 => $macro!($self.f32().unwrap() $(, $opt_args)*),
DataType::Float64 => $macro!($self.f64().unwrap() $(, $opt_args)*),
dt => panic!("not implemented for {:?}", dt),
}
}};
}
/// Apply a macro on the Downcasted ChunkedArrays of DataTypes that are logical numerics.
/// So no logical.
#[macro_export]
macro_rules! downcast_as_macro_arg_physical_mut {
($self:expr, $macro:ident $(, $opt_args:expr)*) => {{
// clone so that we do not borrow
match $self.dtype().clone() {
#[cfg(feature = "dtype-u8")]
DataType::UInt8 => {
let ca: &mut UInt8Chunked = $self.as_mut();
$macro!(UInt8Type, ca $(, $opt_args)*)
},
#[cfg(feature = "dtype-u16")]
DataType::UInt16 => {View on GitHub (pinned to 68506541d2)
Solutions
- This operation is not implemented for the given type; convert to a supported type first.
- Consult the function's supported-type list and cast accordingly.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: This panic/expect fires when execution reaches an unguarded state described by: "not implemented for {:?}". 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 ("not implemented for {:?}"). 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@68506541d2 (2026-08-19).
Data as JSON: /api/errors/23e2193540a8699a.
Report an issue: GitHub.