diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 13:45:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 13:45:09 +0000 |
commit | 639a208fa57ea674d165c4837e96f3ae4d7e3e61 (patch) | |
tree | f4d66da146c396d407cecefb5b405e609af1109e /sqlglot/optimizer/annotate_types.py | |
parent | Releasing debian version 11.0.1-1. (diff) | |
download | sqlglot-639a208fa57ea674d165c4837e96f3ae4d7e3e61.tar.xz sqlglot-639a208fa57ea674d165c4837e96f3ae4d7e3e61.zip |
Merging upstream version 11.1.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/optimizer/annotate_types.py')
-rw-r--r-- | sqlglot/optimizer/annotate_types.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sqlglot/optimizer/annotate_types.py b/sqlglot/optimizer/annotate_types.py index 66f97a9..be65ab9 100644 --- a/sqlglot/optimizer/annotate_types.py +++ b/sqlglot/optimizer/annotate_types.py @@ -280,6 +280,9 @@ class TypeAnnotator: } # First annotate the current scope's column references for col in scope.columns: + if not col.table: + continue + source = scope.sources.get(col.table) if isinstance(source, exp.Table): col.type = self.schema.get_column_type(source, col) |