{"record":{"id":"ee43767fd42ef160","repo":"pola-rs/polars","slug":"not-implemented-ee4376","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-arrow/src/datatypes/mod.rs","lineNumber":330,"sourceCode":"            Interval(IntervalUnit::MonthDayMillis) => {\n                PhysicalType::Primitive(PrimitiveType::MonthDayMillis)\n            },\n            Binary => PhysicalType::Binary,\n            FixedSizeBinary(_) => PhysicalType::FixedSizeBinary,\n            LargeBinary => PhysicalType::LargeBinary,\n            Utf8 => PhysicalType::Utf8,\n            LargeUtf8 => PhysicalType::LargeUtf8,\n            BinaryView => PhysicalType::BinaryView,\n            Utf8View => PhysicalType::Utf8View,\n            List(_) => PhysicalType::List,\n            FixedSizeList(_, _) => PhysicalType::FixedSizeList,\n            LargeList(_) => PhysicalType::LargeList,\n            Struct(_) => PhysicalType::Struct,\n            Union(_) => PhysicalType::Union,\n            Map(_, _) => PhysicalType::Map,\n            Dictionary(key, _, _) => PhysicalType::Dictionary(*key),\n            Extension(ext) => ext.inner.to_physical_type(),\n            Unknown => unimplemented!(),\n        }\n    }\n\n    // The datatype underlying this (possibly logical) arrow data type.\n    pub fn underlying_physical_type(&self) -> ArrowDataType {\n        use ArrowDataType::*;\n        match self {\n            Null | Boolean | Int8 | Int16 | Int32 | Int64 | Int128 | UInt8 | UInt16 | UInt32\n            | UInt64 | UInt128 | Float16 | Float32 | Float64 | Binary | LargeBinary | Utf8\n            | LargeUtf8 | BinaryView | Utf8View | FixedSizeBinary(_) | Unknown => self.clone(),\n\n            Decimal32(_, _) | Date32 | Time32(_) | Interval(IntervalUnit::YearMonth) => Int32,\n            Decimal64(_, _)\n            | Date64\n            | Timestamp(_, _)\n            | Time64(_)\n            | Duration(_)\n            | Interval(IntervalUnit::DayTime) => Int64,","sourceCodeStart":312,"sourceCodeEnd":348,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/crates/polars-arrow/src/datatypes/mod.rs#L312-L348","documentation":"ArrowDataType::to_physical_type() translates a logical dtype into the PhysicalType that all kernels dispatch on. The Unknown variant — a placeholder for types that could not be resolved, e.g. imported foreign Arrow data with an unrecognized type code — hits unimplemented!() (crates/polars-arrow/src/datatypes/mod.rs:330). Because virtually every kernel in the crate starts with to_physical_type(), any operation on an Unknown-typed array panics somewhere deep in the stack.","triggerScenarios":"Reading IPC/Feather or FFI-imported data whose flatbuffer type is not recognized produces Unknown columns; then any compute (concatenate, take, cast, comparison) on that column calls to_physical_type() and panics.","commonSituations":"Version skew: a producer uses a newer or nonstandard Arrow type than this polars-arrow knows; corrupted type metadata; relay services that read and forward foreign Arrow without schema validation.","solutions":["Inspect the schema right after reading and drop or re-type Unknown columns before any compute","Fix the producing side to write types this polars-arrow version understands","Upgrade polars/polars-arrow so the foreign type becomes known on import","Fail fast at ingestion with a named-column error instead of letting kernels panic"],"exampleFix":"// before\nlet out = concatenate(&[&a, &b])?; // panics inside to_physical_type() on Unknown\n\n// after\nfor f in &schema.fields {\n    if matches!(f.dtype(), ArrowDataType::Unknown) {\n        polars_bail!(ComputeError: \"column '{}' has Unknown dtype; re-export or drop it\", f.name);\n    }\n}\nlet out = concatenate(&[&a, &b])?;","handlingStrategy":"validation","validationCode":"for f in &schema.fields {\n    polars_ensure!(\n        !matches!(f.dtype(), ArrowDataType::Unknown),\n        ComputeError: \"column '{}' has Unknown dtype (unrecognized type on import); drop or re-type it\", f.name\n    );\n}","typeGuard":"fn contains_unknown(dtype: &ArrowDataType) -> bool {\n    match dtype {\n        ArrowDataType::Unknown => true,\n        ArrowDataType::List(f) | ArrowDataType::LargeList(f) | ArrowDataType::FixedSizeList(f, _) => contains_unknown(f.dtype()),\n        ArrowDataType::Struct(fs) => fs.iter().any(|f| contains_unknown(f.dtype())),\n        ArrowDataType::Dictionary(_, v, _) => contains_unknown(v),\n        ArrowDataType::Extension(e) => contains_unknown(&e.inner),\n        _ => false,\n    }\n}","tryCatchPattern":null,"preventionTips":["Run a schema lint directly after every foreign read; reject Unknown before compute","Pin producer and consumer to compatible Arrow versions","Log unrecognized type names at import so gaps are visible in operations"],"tags":["rust","polars-arrow","dtype","unknown","ipc","panic"],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}