Skip to content

Commit d989dcb

Browse files
authored
fix(presto): don't overwrite_types when annotating types in struct_sql()
1 parent fc55b98 commit d989dcb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sqlglot/dialects/presto.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,9 @@ def bracket_sql(self, expression: exp.Bracket) -> str:
711711
def struct_sql(self, expression: exp.Struct) -> str:
712712
from sqlglot.optimizer.annotate_types import annotate_types
713713

714-
expression = annotate_types(expression, dialect=self.dialect)
714+
expression = annotate_types(
715+
expression, dialect=self.dialect, overwrite_types=False
716+
)
715717
values: t.List[str] = []
716718
schema: t.List[str] = []
717719
unknown_type = False

0 commit comments

Comments
 (0)