From 374a0f6318bcf423b1b784d30b25a8327c65cb24 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 6 Jul 2023 09:28:12 +0200 Subject: Merging upstream version 17.2.0. Signed-off-by: Daniel Baumann --- sqlglot/executor/context.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sqlglot/executor/context.py') 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: -- cgit v1.2.3