{"record":{"id":"bf0649619f51fb55","repo":"pola-rs/polars","slug":"arrow-datatype-dt-not-supported-by-polars-you","errorCode":null,"errorMessage":"Arrow datatype {dt:?} not supported by Polars. You probably need to activate that data-type feature.","messagePattern":"Arrow datatype (.+?) not supported by Polars\\. You probably need to activate that data-type feature\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-core/src/datatypes/field.rs","lineNumber":333,"sourceCode":"            ArrowDataType::LargeBinary | ArrowDataType::Binary => DataType::Binary,\n            ArrowDataType::FixedSizeBinary(_) => DataType::Binary,\n            ArrowDataType::Map(inner, _keys_sorted) => {\n                let entries = Self::from_arrow_field(inner);\n                #[cfg(feature = \"dtype-map\")]\n                let map = entries.map_from_positional_entries_dtype();\n                #[cfg(not(feature = \"dtype-map\"))]\n                let map: Option<DataType> = None;\n                map.unwrap_or_else(|| DataType::List(entries.boxed()))\n            },\n            ArrowDataType::Interval(IntervalUnit::MonthDayNano) => {\n                check_allow_importing_interval_as_struct(\"month_day_nano_interval\").unwrap();\n                feature_gated!(\"dtype-struct\", DataType::_month_days_ns_struct_type())\n            },\n            ArrowDataType::Interval(IntervalUnit::MonthDayMillis) => {\n                check_allow_importing_interval_as_struct(\"month_day_millisecond_interval\").unwrap();\n                feature_gated!(\"dtype-struct\", DataType::_month_days_ns_struct_type())\n            },\n            dt => panic!(\n                \"Arrow datatype {dt:?} not supported by Polars. \\\n                You probably need to activate that data-type feature.\"\n            ),\n        }\n    }\n}\n\nimpl From<&ArrowField> for Field {\n    fn from(f: &ArrowField) -> Self {\n        Field::new(f.name.clone(), DataType::from_arrow_field(f))\n    }\n}\n","sourceCodeStart":315,"sourceCodeEnd":346,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/crates/polars-core/src/datatypes/field.rs#L315-L346","documentation":"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).","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// Cargo.toml\n// before\npolars = { version = \"x\", features = [\"ipc\"] }\n// after\npolars = { version = \"x\", features = [\"ipc\", \"dtype-decimal\", \"dtype-categorical\"] }","handlingStrategy":"validation","validationCode":"# python: preflight schema against a known-supported set before read_\nunsupported = {dt for dt in arrow_schema.types if str(dt).startswith(('decimal', 'large_list', 'timestamp'))} and not has_feature(...)\n# or in Rust: match dt { supported => .., other => pre-cast other upstream }","typeGuard":null,"tryCatchPattern":"let res = std::panic::catch_unwind(|| DataType::from_arrow(&arrow_dt, md));\nif res.is_err() { eprintln!(\"enable the matching dtype-* cargo feature for {arrow_dt:?}\"); }","preventionTips":["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"],"tags":["polars","rust","feature-flags","arrow-schema"],"backgroundTag":"unsupported-dtype","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}