diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-06 07:28:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-06 07:28:09 +0000 |
commit | 52f4a5e2260f3e5b919b4e270339afd670bf0b8a (patch) | |
tree | 5ca419af0e2e409018492b82f5b9847f0112b5fb /sqlglot/executor/context.py | |
parent | Adding upstream version 16.7.7. (diff) | |
download | sqlglot-2f02f0e810711b84721e8220b4c0eaafd7677bdd.tar.xz sqlglot-2f02f0e810711b84721e8220b4c0eaafd7677bdd.zip |
Adding upstream version 17.2.0.upstream/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.py | 2 |
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: |