{"record":{"id":"4551dfd2fd4f7c53","repo":"pola-rs/polars","slug":"reverse-for-fixedsizelist-with-non-numeric-dtypes","errorCode":null,"errorMessage":"reverse for FixedSizeList with non-numeric dtypes not yet supported","messagePattern":"reverse for FixedSizeList with non-numeric dtypes not yet supported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-core/src/chunked_array/ops/reverse.rs","lineNumber":100,"sourceCode":"                PlSmallStr::EMPTY,\n                (0..self.len() as IdxSize).rev().collect(),\n            );\n            unsafe { self.take_unchecked(&ca) }\n        }\n    }\n}\n\nimpl ChunkReverse for StringChunked {\n    fn reverse(&self) -> Self {\n        unsafe { self.as_binary().reverse().to_string_unchecked() }\n    }\n}\n\n#[cfg(feature = \"dtype-array\")]\nimpl ChunkReverse for ArrayChunked {\n    fn reverse(&self) -> Self {\n        if !self.inner_dtype().is_primitive_numeric() {\n            todo!(\"reverse for FixedSizeList with non-numeric dtypes not yet supported\")\n        }\n        let ca = self.rechunk();\n        let arr = ca.downcast_as_array();\n        let values = arr.values().as_ref();\n\n        let mut builder =\n            get_fixed_size_list_builder(ca.inner_dtype(), ca.len(), ca.width(), ca.name().clone())\n                .expect(\"not yet supported\");\n\n        // SAFETY, we are within bounds\n        unsafe {\n            if arr.null_count() == 0 {\n                for i in (0..arr.len()).rev() {\n                    builder.push_unchecked(values, i)\n                }\n            } else {\n                let validity = arr.validity().unwrap();\n                for i in (0..arr.len()).rev() {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-core/src/chunked_array/ops/reverse.rs#L82-L118","documentation":"todo!() in ArrayChunked::reverse: reversing a FixedSizeList column whose inner dtype is not primitive numeric is not yet implemented (the fast path reinterprets numeric rows). Unsupported functionality; cast or rechunk differently until implemented.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"reverse for FixedSizeList with non-numeric dtypes 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 (\"reverse for FixedSizeList with non-numeric dtypes 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":["Cast the FixedSizeList inner dtype to a numeric type before reversing.","Convert the array to a regular List and reverse element-wise as a workaround."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b5d73fd00236295624374b075d16b1fe6ec6df9","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}