1
0
Fork 0

Adding upstream version 26.19.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-24 07:15:24 +02:00
parent 873e685933
commit 0eb0fedc25
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
98 changed files with 67345 additions and 65319 deletions

View file

@ -220,7 +220,7 @@ def _explode_to_unnest_sql(self: Presto.Generator, expression: exp.Lateral) -> s
return explode_to_unnest_sql(self, expression)
def _amend_exploded_column_table(expression: exp.Expression) -> exp.Expression:
def amend_exploded_column_table(expression: exp.Expression) -> exp.Expression:
# We check for expression.type because the columns can be amended only if types were inferred
if isinstance(expression, exp.Select) and expression.type:
for lateral in expression.args.get("laterals") or []:
@ -484,11 +484,12 @@ class Presto(Dialect):
exp.SchemaCommentProperty: lambda self, e: self.naked_property(e),
exp.Select: transforms.preprocess(
[
transforms.eliminate_window_clause,
transforms.eliminate_qualify,
transforms.eliminate_distinct_on,
transforms.explode_projection_to_unnest(1),
transforms.eliminate_semi_and_anti_joins,
_amend_exploded_column_table,
amend_exploded_column_table,
]
),
exp.SortArray: _no_sort_array,