pola-rs/polars · error
Arrow datatype not supported by Polars. You probably need…
Error message
Arrow datatype {dt:?} not supported by Polars. You probably need to activate that data-type feature. What it means
DataType::from_arrow's catch-all arm panics when it meets an Arrow datatype Polars cannot map in the current build, telling the user the corresponding data-type cargo feature is probably missing (e.g. dtype-decimal, dtype-categorical, dtype-duration).
Solutions
- Identify the offending dt: arrow type from the panic message and enable the matching Polars feature (e.g. 'dtype-decimal', 'dtype-categorical', 'dtype-duration', 'dtype-time')
- Switch to a full-featured Polars build/package
- Transform the Arrow schema upstream to cast unsupported types to supported primitives
Example fix
// Cargo.toml
// before
polars = { version = "x", features = ["ipc"] }
// after
polars = { version = "x", features = ["ipc", "dtype-decimal", "dtype-categorical"] } Defensive patterns
Strategy: validation
Validate before calling
# python: preflight schema against a known-supported set before read_
unsupported = {dt for dt in arrow_schema.types if str(dt).startswith(('decimal', 'large_list', 'timestamp'))} and not has_feature(...)
# or in Rust: match dt { supported => .., other => pre-cast other upstream } Try / catch
let res = std::panic::catch_unwind(|| DataType::from_arrow(&arrow_dt, md));
if res.is_err() { eprintln!("enable the matching dtype-* cargo feature for {arrow_dt:?}"); } Prevention
- Enable all dtype-* features you actually ingest (decimal, categorical, duration, time, array, struct)
- Audit Arrow/Parquet file schemas before choosing Polars build features
- Re-audit features after producers add new column types
When it happens
Trigger: Reading Arrow/Parquet/IPC data whose schema contains types like Decimal, Categorical, Duration, or Time while the matching Polars cargo feature is disabled (build- or crate-level).
Common situations: Minimal-featured Polars builds reading real-world files that use non-primitive Arrow types; upgrading a producer that now writes new Arrow types while the consumer build stayed trimmed.
Related errors
- activate ' ' feature
- activate feature dtype-duration
- activate 'propagate_nans' feature
- activate 'round_series' feature
- activate the 'dtype-struct' feature to handle struct data…
AI-assisted analysis of pola-rs/polars@fe841f959e (2026-09-18).
Data as JSON: /api/errors/bf0649619f51fb55.
Report an issue: GitHub.
Appendix: source
Thrown at crates/polars-core/src/datatypes/field.rs:333
ArrowDataType::LargeBinary | ArrowDataType::Binary => DataType::Binary,
ArrowDataType::FixedSizeBinary(_) => DataType::Binary,
ArrowDataType::Map(inner, _keys_sorted) => {
let entries = Self::from_arrow_field(inner);
#[cfg(feature = "dtype-map")]
let map = entries.map_from_positional_entries_dtype();
#[cfg(not(feature = "dtype-map"))]
let map: Option<DataType> = None;
map.unwrap_or_else(|| DataType::List(entries.boxed()))
},
ArrowDataType::Interval(IntervalUnit::MonthDayNano) => {
check_allow_importing_interval_as_struct("month_day_nano_interval").unwrap();
feature_gated!("dtype-struct", DataType::_month_days_ns_struct_type())
},
ArrowDataType::Interval(IntervalUnit::MonthDayMillis) => {
check_allow_importing_interval_as_struct("month_day_millisecond_interval").unwrap();
feature_gated!("dtype-struct", DataType::_month_days_ns_struct_type())
},
dt => panic!(
"Arrow datatype {dt:?} not supported by Polars. \
You probably need to activate that data-type feature."
),
}
}
}
impl From<&ArrowField> for Field {
fn from(f: &ArrowField) -> Self {
Field::new(f.name.clone(), DataType::from_arrow_field(f))
}
}
View on GitHub (pinned to fe841f959e)