Skip to content

Commit cf10ba7

Browse files
committed
fix varchar
1 parent 6fc5418 commit cf10ba7

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

sqlglot-integration-tests

sqlglot/optimizer/annotate_types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,9 @@ def _get_scope_selects(self, scope: Scope) -> dict[str, dict[str, t.Any]]:
355355
if alias_node:
356356
col_types[field_col.name] = alias_node.type
357357
else:
358-
col_types[field_col.name] = exp.DType.VARCHAR
358+
col_types[field_col.name] = exp.DataType.build(
359+
"VARCHAR", dialect=self.dialect
360+
)
359361

360362
# Value column types from the IN source columns
361363
src = first.this if is_pivot_alias else first

0 commit comments

Comments
 (0)