{"record":{"id":"c049bdeee5fcf559","repo":"pola-rs/polars","slug":"predicate-not-boolean","errorCode":null,"errorMessage":"predicate not boolean","messagePattern":"predicate not boolean","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-stream/src/nodes/io_sources/multi_scan/components/apply_extra_ops.rs","lineNumber":336,"sourceCode":"                }),\n            );\n\n            let offset = ri.offset.saturating_add(\n                current_row_position\n                    .add(local_offset_adjustment)\n                    .num_rows_idxsize_saturating()?,\n            );\n\n            let row_index_col = Column::new_row_index(ri.name.clone(), offset, df.height())?;\n\n            debug_assert_eq!(df.columns()[*col_idx].name(), &ri.name);\n\n            unsafe { *df.columns_mut().get_mut(*col_idx).unwrap() = row_index_col }\n        }\n\n        if let Some(predicate) = predicate {\n            let mask = predicate.predicate.evaluate_io(df)?;\n            *df = df.filter_seq(mask.bool().expect(\"predicate not boolean\"))?;\n        }\n\n        Ok(())\n    }\n}\n","sourceCodeStart":318,"sourceCodeEnd":342,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-stream/src/nodes/io_sources/multi_scan/components/apply_extra_ops.rs#L318-L342","documentation":"Generic polars error raised in apply_extra_ops when evaluating a scan predicate yields a non-boolean mask: multi_scan requires filter predicates to resolve to Boolean so it can use the mask for row selection; any other dtype at this point is a predicate/plan bug rather than bad user input.","triggerScenarios":"A scan predicate expression evaluated to a non-boolean dtype.","commonSituations":"See trigger scenarios.","solutions":["Ensure the predicate/filter expression returns a boolean column; cast or rewrite the expression to produce booleans."],"exampleFix":"lf = lf.filter(pl.col('a') > 0)  # boolean predicate","handlingStrategy":"validation","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-14T00:17:10.932Z"}