1
0
Fork 0

Adding upstream version 26.15.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-04-21 09:50:00 +02:00
parent dfe1cec38a
commit 4bfa0e7e53
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
58 changed files with 4878 additions and 4677 deletions

View file

@ -57,8 +57,12 @@ def _no_sort_array(self: Presto.Generator, expression: exp.SortArray) -> str:
def _schema_sql(self: Presto.Generator, expression: exp.Schema) -> str:
if isinstance(expression.parent, exp.PartitionedByProperty):
columns = ", ".join(f"'{c.name}'" for c in expression.expressions)
return f"ARRAY[{columns}]"
partition_exprs = [
self.sql(c) if isinstance(c, (exp.Func, exp.Property)) else self.sql(c, "this")
for c in expression.expressions
]
return self.sql(exp.Array(expressions=[exp.Literal.string(c) for c in partition_exprs]))
if expression.parent:
for schema in expression.parent.find_all(exp.Schema):