Adding upstream version 25.34.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
0375f9323c
commit
2ebe732d69
66 changed files with 53358 additions and 52814 deletions
|
@ -2399,18 +2399,21 @@ class Generator(metaclass=_Generator):
|
|||
f"'{nulls_sort_change.strip()}' translation not supported in window functions"
|
||||
)
|
||||
nulls_sort_change = ""
|
||||
elif (
|
||||
self.NULL_ORDERING_SUPPORTED is False
|
||||
and (isinstance(expression.find_ancestor(exp.AggFunc, exp.Select), exp.AggFunc))
|
||||
and (
|
||||
(asc and nulls_sort_change == " NULLS LAST")
|
||||
or (desc and nulls_sort_change == " NULLS FIRST")
|
||||
)
|
||||
elif self.NULL_ORDERING_SUPPORTED is False and (
|
||||
(asc and nulls_sort_change == " NULLS LAST")
|
||||
or (desc and nulls_sort_change == " NULLS FIRST")
|
||||
):
|
||||
self.unsupported(
|
||||
f"'{nulls_sort_change.strip()}' translation not supported for aggregate functions with {sort_order} sort order"
|
||||
)
|
||||
nulls_sort_change = ""
|
||||
# BigQuery does not allow these ordering/nulls combinations when used under
|
||||
# an aggregation func or under a window containing one
|
||||
ancestor = expression.find_ancestor(exp.AggFunc, exp.Window, exp.Select)
|
||||
|
||||
if isinstance(ancestor, exp.Window):
|
||||
ancestor = ancestor.this
|
||||
if isinstance(ancestor, exp.AggFunc):
|
||||
self.unsupported(
|
||||
f"'{nulls_sort_change.strip()}' translation not supported for aggregate functions with {sort_order} sort order"
|
||||
)
|
||||
nulls_sort_change = ""
|
||||
elif self.NULL_ORDERING_SUPPORTED is None:
|
||||
if expression.this.is_int:
|
||||
self.unsupported(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue