diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-30 17:08:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-30 17:08:37 +0000 |
commit | be1cb18ea28222fca384a5459a024b7e9af5cadb (patch) | |
tree | 4698c9069380a7c30ceb51129f93f6c8662315e4 /sqlglot/schema.py | |
parent | Releasing debian version 10.5.6-1. (diff) | |
download | sqlglot-be1cb18ea28222fca384a5459a024b7e9af5cadb.tar.xz sqlglot-be1cb18ea28222fca384a5459a024b7e9af5cadb.zip |
Merging upstream version 10.5.10.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/schema.py')
-rw-r--r-- | sqlglot/schema.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sqlglot/schema.py b/sqlglot/schema.py index a0d69a7..f6f3883 100644 --- a/sqlglot/schema.py +++ b/sqlglot/schema.py @@ -109,10 +109,7 @@ class AbstractMappingSchema(t.Generic[T]): value, trie = in_trie(self.mapping_trie if trie is None else trie, parts) if value == 0: - if raise_on_missing: - raise SchemaError(f"Cannot find mapping for {table}.") - else: - return None + return None elif value == 1: possibilities = flatten_schema(trie, depth=dict_depth(trie) - 1) if len(possibilities) == 1: @@ -262,7 +259,7 @@ class MappingSchema(AbstractMappingSchema[t.Dict[str, str]], Schema): schema = self.find(table_) if schema is None: - raise SchemaError(f"Could not find table schema {table}") + return [] if not only_visible or not self.visible: return list(schema) |