Apply the given TableAlias to the input plan
(
&self,
plan: LogicalPlan,
alias: TableAlias,
)
| 543 | |
| 544 | /// Apply the given TableAlias to the input plan |
| 545 | pub(crate) fn apply_table_alias( |
| 546 | &self, |
| 547 | plan: LogicalPlan, |
| 548 | alias: TableAlias, |
| 549 | ) -> Result<LogicalPlan> { |
| 550 | let idents = alias.columns.into_iter().map(|c| c.name).collect(); |
| 551 | let plan = self.apply_expr_alias(plan, idents)?; |
| 552 | |
| 553 | LogicalPlanBuilder::from(plan) |
| 554 | .alias(TableReference::bare( |
| 555 | self.ident_normalizer.normalize(alias.name), |
| 556 | ))? |
| 557 | .build() |
| 558 | } |
| 559 | |
| 560 | pub(crate) fn apply_expr_alias( |
| 561 | &self, |