(
&self,
plan: LogicalPlan,
_config: &dyn OptimizerConfig,
)
| 47 | } |
| 48 | |
| 49 | fn rewrite( |
| 50 | &self, |
| 51 | plan: LogicalPlan, |
| 52 | _config: &dyn OptimizerConfig, |
| 53 | ) -> Result<Transformed<LogicalPlan>> { |
| 54 | match plan { |
| 55 | LogicalPlan::Join(join) if join.join_type == Inner && join.on.is_empty() => { |
| 56 | match join.filter { |
| 57 | Some(Expr::Literal(ScalarValue::Boolean(Some(false)), _)) => Ok( |
| 58 | Transformed::yes(LogicalPlan::EmptyRelation(EmptyRelation { |
| 59 | produce_one_row: false, |
| 60 | schema: join.schema, |
| 61 | })), |
| 62 | ), |
| 63 | _ => Ok(Transformed::no(LogicalPlan::Join(join))), |
| 64 | } |
| 65 | } |
| 66 | _ => Ok(Transformed::no(plan)), |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | fn supports_rewrite(&self) -> bool { |
| 71 | true |
nothing calls this directly
no test coverage detected