summaryrefslogtreecommitdiffstats
path: root/sqlglot/executor/context.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-06 07:28:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-06 07:28:12 +0000
commit374a0f6318bcf423b1b784d30b25a8327c65cb24 (patch)
tree9303a1cbdba85b5d9781ebef32eb1902d3790c99 /sqlglot/executor/context.py
parentReleasing debian version 16.7.7-1. (diff)
downloadsqlglot-374a0f6318bcf423b1b784d30b25a8327c65cb24.tar.xz
sqlglot-374a0f6318bcf423b1b784d30b25a8327c65cb24.zip
Merging upstream version 17.2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/executor/context.py')
-rw-r--r--sqlglot/executor/context.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sqlglot/executor/context.py b/sqlglot/executor/context.py
index 630cb65..d7952c1 100644
--- a/sqlglot/executor/context.py
+++ b/sqlglot/executor/context.py
@@ -41,11 +41,13 @@ class Context:
def table(self) -> Table:
if self._table is None:
self._table = list(self.tables.values())[0]
+
for other in self.tables.values():
if self._table.columns != other.columns:
raise Exception(f"Columns are different.")
if len(self._table.rows) != len(other.rows):
raise Exception(f"Rows are different.")
+
return self._table
def add_columns(self, *columns: str) -> None: