Skip to content

Commit a38edec

Browse files
authored
Refactor
1 parent d989dcb commit a38edec

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

sqlglot/dialects/presto.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,8 @@ 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(
715-
expression, dialect=self.dialect, overwrite_types=False
716-
)
714+
if not expression.type:
715+
expression = annotate_types(expression, dialect=self.dialect)
717716
values: t.List[str] = []
718717
schema: t.List[str] = []
719718
unknown_type = False

0 commit comments

Comments
 (0)