(
node: sql_expr.Expression, tab: table.Table, context: ContextType
)
| 627 | |
| 628 | |
| 629 | def _alias_block( |
| 630 | node: sql_expr.Expression, tab: table.Table, context: ContextType |
| 631 | ) -> tuple[table.Table, ContextType]: |
| 632 | if (alias_field := node.args.pop("alias", None)) is not None: |
| 633 | alias = _run(alias_field, context) |
| 634 | assert isinstance(alias, str) |
| 635 | context = context.copy() |
| 636 | tab = tab.copy() |
| 637 | context[alias] = tab |
| 638 | return tab, context |
| 639 | |
| 640 | |
| 641 | def _check_work_done(node: sql_expr.Expression) -> None: |