Override the default implementations of [Self::mfp_filter] and [Self::mfp_plan_filter] so that the fallibility of MFP expressions surfaces in the result, even when the expression's result column isn't referenced by a predicate or temporal bound. The runtime MFP evaluator runs every expression once all the preceding predicates pass (see [`crate::SafeMfpPlan::evaluate_inner`]), so an expression tha
(&self, mfp: &MapFilterProject)
| 1078 | /// `fallible` flag and persist filter pushdown can wrongly discard a part |
| 1079 | /// that actually produces error rows. See database-issues#9656. |
| 1080 | fn mfp_filter(&self, mfp: &MapFilterProject) -> Self::Summary { |
| 1081 | let mfp_eval = MfpEval::new(self, mfp.input_arity, &mfp.expressions); |
| 1082 | let predicates = mfp |
| 1083 | .predicates |
| 1084 | .iter() |
| 1085 | .map(|(_, e)| mfp_eval.expr(e)) |
| 1086 | .collect(); |
| 1087 | let mut result = self.variadic(&And.into(), predicates); |
| 1088 | if mfp_eval.expressions.iter().any(|s| s.range.fallible) { |
| 1089 | result.range.fallible = true; |
| 1090 | } |
| 1091 | result |
| 1092 | } |
| 1093 | |
| 1094 | fn mfp_plan_filter(&self, plan: &MfpPlan) -> Self::Summary { |
| 1095 | let mfp_eval = MfpEval::new(self, plan.mfp.input_arity, &plan.mfp.expressions); |