Merging upstream version 18.4.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b982664fe2
commit
d90681de49
92 changed files with 43076 additions and 40554 deletions
|
@ -128,7 +128,7 @@ def _mergeable(outer_scope, inner_scope, leave_tables_isolated, from_or_join):
|
|||
def _is_a_window_expression_in_unmergable_operation():
|
||||
window_expressions = inner_select.find_all(exp.Window)
|
||||
window_alias_names = {window.parent.alias_or_name for window in window_expressions}
|
||||
inner_select_name = inner_select.parent.alias_or_name
|
||||
inner_select_name = from_or_join.alias_or_name
|
||||
unmergable_window_columns = [
|
||||
column
|
||||
for column in outer_scope.columns
|
||||
|
|
|
@ -129,7 +129,7 @@ def _expand_using(scope: Scope, resolver: Resolver) -> t.Dict[str, t.Any]:
|
|||
table = columns.get(identifier)
|
||||
|
||||
if not table or identifier not in join_columns:
|
||||
if columns and join_columns:
|
||||
if (columns and "*" not in columns) and join_columns:
|
||||
raise OptimizeError(f"Cannot automatically join: {identifier}")
|
||||
|
||||
table = table or source_table
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue