"project" an expression using these projection's expressions For example, consider an expression `c1 + c2 > 5`, and a schema `[c1, c2]` a projection `c1 + c2 as c1_c2` This method would rewrite the expression to `c1_c2 > 5`
(
&self,
expr: &Arc<dyn PhysicalExpr>,
)
| 510 | /// |
| 511 | /// * This method would rewrite the expression to `c1_c2 > 5` |
| 512 | pub fn project_expr( |
| 513 | &self, |
| 514 | expr: &Arc<dyn PhysicalExpr>, |
| 515 | ) -> Result<Arc<dyn PhysicalExpr>> { |
| 516 | update_expr(expr, &self.exprs, false)?.ok_or_else(|| { |
| 517 | internal_datafusion_err!( |
| 518 | "Failed to project an expression {} with ProjectionExprs {}", |
| 519 | expr, |
| 520 | self.exprs.iter().map(|e| format!("{e}")).join(", ") |
| 521 | ) |
| 522 | }) |
| 523 | } |
| 524 | |
| 525 | /// Create a new [`Projector`] from this projection and an input schema. |
| 526 | /// |
nothing calls this directly
no test coverage detected