Skip to content

Commit

Permalink
Fix(parser): edge case in _parse_types (#3656)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesittas authored Jun 14, 2024
1 parent d331e56 commit a06ee36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sqlglot/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4288,7 +4288,7 @@ def _parse_types(
any_token=False, tokens=(TokenType.VAR,)
)
if identifier:
tokens = self.dialect.tokenize(identifier.name)
tokens = self.dialect.tokenize(identifier.sql(dialect=self.dialect))

if len(tokens) != 1:
self.raise_error("Unexpected identifier", self._prev)
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/identity.sql
Original file line number Diff line number Diff line change
Expand Up @@ -873,3 +873,4 @@ SELECT copy
SELECT rollup
SELECT unnest
SELECT * FROM a STRAIGHT_JOIN b
SELECT COUNT(DISTINCT "foo bar") FROM (SELECT 1 AS "foo bar") AS t

0 comments on commit a06ee36

Please sign in to comment.