{"record":{"id":"3520fe2047b3fd7a","repo":"pola-rs/polars","slug":"with-not-set","errorCode":null,"errorMessage":"with not set","messagePattern":"with not set","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-lazy/src/frame/mod.rs","lineNumber":2276,"sourceCode":"            .join(\n                other.logical_plan,\n                self.left_on,\n                self.right_on,\n                JoinOptions {\n                    allow_parallel: self.allow_parallel,\n                    force_parallel: self.force_parallel,\n                    args,\n                }\n                .into(),\n            )?\n            .build();\n        Ok(LazyFrame::from_logical_plan(lp, opt_state))\n    }\n\n    // Finish with join predicates\n    pub fn join_where(self, predicates: Vec<Expr>) -> LazyFrame {\n        let opt_state = self.lf.opt_state;\n        let other = self.other.expect(\"with not set\");\n\n        // Decompose `And` conjunctions into their component expressions\n        fn decompose_and(predicate: Expr, expanded_predicates: &mut Vec<Expr>) {\n            if let Expr::BinaryExpr {\n                op: Operator::And,\n                left,\n                right,\n            } = predicate\n            {\n                decompose_and((*left).clone(), expanded_predicates);\n                decompose_and((*right).clone(), expanded_predicates);\n            } else {\n                expanded_predicates.push(predicate);\n            }\n        }\n        let mut expanded_predicates = Vec::with_capacity(predicates.len() * 2);\n        for predicate in predicates {\n            decompose_and(predicate, &mut expanded_predicates);","sourceCodeStart":2258,"sourceCodeEnd":2294,"githubUrl":"https://github.com/pola-rs/polars/blob/5d8ebabf11caea54a5c29178a64a058762f49766/crates/polars-lazy/src/frame/mod.rs#L2258-L2294","documentation":"In the lazy join builder, finish() resolves the right-hand frame via self.other.expect(\"with not set in join builder\"); calling finish (or join_where which relies on the builder state) before setting `other` with .with(...) makes the Option unwrap fail and panics with this message.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"with not set\". 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 (\"with not set\"). 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":["Set the `with` argument (the other frame/keys) on the join builder before finishing.","Verify the builder chain includes `.with(...)` prior to `.build()`/`.finish()`."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5d8ebabf11caea54a5c29178a64a058762f49766","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}