{"record":{"id":"d1c1a50f2114dd18","repo":"pola-rs/polars","slug":"multiple-nested-objects-not-yet-supported","errorCode":null,"errorMessage":"multiple nested objects not yet supported","messagePattern":"multiple nested objects not yet supported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-core/src/chunked_array/object/extension/drop.rs","lineNumber":16,"sourceCode":"use crate::chunked_array::object::extension::PolarsExtension;\nuse crate::prelude::*;\n\n/// This will dereference a raw ptr when dropping the [`PolarsExtension`], make sure that it's valid.\npub(crate) unsafe fn drop_list(ca: &ListChunked) {\n    let mut inner = ca.inner_dtype();\n    let mut nested_count = 0;\n\n    while let Some(a) = inner.inner_dtype() {\n        nested_count += 1;\n        inner = a;\n    }\n\n    if matches!(inner, DataType::Object(_)) {\n        if nested_count != 0 {\n            panic!(\"multiple nested objects not yet supported\")\n        }\n        for lst_arr in &ca.chunks {\n            if let ArrowDataType::LargeList(fld) = lst_arr.dtype() {\n                let dtype = fld.dtype();\n\n                assert!(matches!(dtype, ArrowDataType::Extension(_)));\n\n                // recreate the polars extension so that the content is dropped\n                let arr = lst_arr.as_any().downcast_ref::<LargeListArray>().unwrap();\n\n                let values = arr.values();\n                drop_object_array(values.as_ref())\n            }\n        }\n    }\n}\n\npub(crate) unsafe fn drop_object_array(values: &dyn Array) {","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/pola-rs/polars/blob/5d8ebabf11caea54a5c29178a64a058762f49766/crates/polars-core/src/chunked_array/object/extension/drop.rs#L1-L34","documentation":"drop_list in the object extension drop path walks the inner dtype of a ListChunked counting nesting levels; if the innermost type is an Object and nested_count != 0 (an object inside a list-of-list or deeper), it panics because dereferencing nested object pointers on drop is unsupported.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"multiple nested objects not yet supported\". 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.","commonSituations":"Encountered when input data or configuration does not meet the preconditions of the throwing code path (\"multiple nested objects not yet supported\"). 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.","solutions":["Flatten nested Object columns before the operation; only one level of object nesting is supported.","Restructure the data so nested objects are stored as separate columns or serialized."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5d8ebabf11caea54a5c29178a64a058762f49766","analyzedAt":"2026-08-28T18:02:35.179Z","contentChangedAt":"2026-08-28T18:02:35.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}