{"record":{"id":"e199d1ab7e2924f1","repo":"pola-rs/polars","slug":"activate-dtype-i128-feature","errorCode":null,"errorMessage":"activate dtype-i128 feature","messagePattern":"activate dtype-i128 feature","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-plan/src/plans/lit.rs","lineNumber":173,"sourceCode":"            DataType::Array(_, size) => AnyValue::Array(s, *size),\n            _ => unreachable!(),\n        };\n\n        Ok(Scalar::new(dtype.clone(), value))\n    }\n}\n\nimpl DynLiteralValue {\n    pub fn try_materialize_to_dtype(\n        self,\n        dtype: &DataType,\n        options: CastOptions,\n    ) -> PolarsResult<Scalar> {\n        match self {\n            DynLiteralValue::Str(s) => Ok(Scalar::from(s).cast_with_options(dtype, options)?),\n            DynLiteralValue::Int(i) => {\n                #[cfg(not(feature = \"dtype-i128\"))]\n                let i: i64 = i.try_into().expect(\"activate dtype-i128 feature\");\n\n                Ok(Scalar::from(i).cast_with_options(dtype, options)?)\n            },\n            DynLiteralValue::Float(f) => Ok(Scalar::from(f).cast_with_options(dtype, options)?),\n            DynLiteralValue::List(dyn_list_value) => {\n                dyn_list_value.try_materialize_to_dtype(dtype, options)\n            },\n        }\n    }\n}\n\nimpl RangeLiteralValue {\n    pub fn try_materialize_to_series(self, dtype: &DataType) -> PolarsResult<Series> {\n        fn handle_range_oob(range: &RangeLiteralValue, to_dtype: &DataType) -> PolarsResult<()> {\n            polars_bail!(\n                InvalidOperation:\n                \"conversion from `{}` to `{to_dtype}` failed for range({}, {})\",\n                range.dtype, range.low, range.high,","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-plan/src/plans/lit.rs#L155-L191","documentation":"Panics in try_materialize_to_dtype when the dtype-i128 cargo feature is disabled but an integer literal exceeding i64 must be narrowed via try_into. The expect guards the feature configuration: building without dtype-i128 cannot represent the requested integer literal.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"activate dtype-i128 feature\". 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 (\"activate dtype-i128 feature\"). 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":["Enable the `dtype-i128` cargo feature to use 128-bit integer literals.","Use Int64 or Decimal if i128 support cannot be enabled."],"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-23T08:17:48.524Z"}