summaryrefslogtreecommitdiffstats
path: root/sqlglot/optimizer/qualify_tables.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-11-01 05:12:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-11-01 05:12:42 +0000
commitc51a9844b869fd7cd69e5cc7658d34f61a865185 (patch)
tree55706c65ce7e19626aabf7ff4dde0e1a51b739db /sqlglot/optimizer/qualify_tables.py
parentReleasing debian version 18.17.0-1. (diff)
downloadsqlglot-c51a9844b869fd7cd69e5cc7658d34f61a865185.tar.xz
sqlglot-c51a9844b869fd7cd69e5cc7658d34f61a865185.zip
Merging upstream version 19.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/optimizer/qualify_tables.py')
-rw-r--r--sqlglot/optimizer/qualify_tables.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlglot/optimizer/qualify_tables.py b/sqlglot/optimizer/qualify_tables.py
index 68aebdb..3a43e8f 100644
--- a/sqlglot/optimizer/qualify_tables.py
+++ b/sqlglot/optimizer/qualify_tables.py
@@ -62,7 +62,7 @@ def qualify_tables(
if isinstance(source.this, exp.Identifier):
if not source.args.get("db"):
source.set("db", exp.to_identifier(db))
- if not source.args.get("catalog"):
+ if not source.args.get("catalog") and source.args.get("db"):
source.set("catalog", exp.to_identifier(catalog))
if not source.alias: