Merging upstream version 26.8.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
d551ab0954
commit
010433ad9a
61 changed files with 43883 additions and 41898 deletions
|
@ -282,7 +282,14 @@ class Scope:
|
|||
self._columns = []
|
||||
for column in columns + external_columns:
|
||||
ancestor = column.find_ancestor(
|
||||
exp.Select, exp.Qualify, exp.Order, exp.Having, exp.Hint, exp.Table, exp.Star
|
||||
exp.Select,
|
||||
exp.Qualify,
|
||||
exp.Order,
|
||||
exp.Having,
|
||||
exp.Hint,
|
||||
exp.Table,
|
||||
exp.Star,
|
||||
exp.Distinct,
|
||||
)
|
||||
if (
|
||||
not ancestor
|
||||
|
@ -290,9 +297,9 @@ class Scope:
|
|||
or isinstance(ancestor, exp.Select)
|
||||
or (isinstance(ancestor, exp.Table) and not isinstance(ancestor.this, exp.Func))
|
||||
or (
|
||||
isinstance(ancestor, exp.Order)
|
||||
isinstance(ancestor, (exp.Order, exp.Distinct))
|
||||
and (
|
||||
isinstance(ancestor.parent, exp.Window)
|
||||
isinstance(ancestor.parent, (exp.Window, exp.WithinGroup))
|
||||
or column.name not in named_selects
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue