Skip to content

Commit

Permalink
Fix: select x.update
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymao committed Jun 12, 2023
1 parent 1acecc2 commit 146e66a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sqlglot/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ class Parser(metaclass=_Parser):
TokenType.TRUE,
TokenType.UNIQUE,
TokenType.UNPIVOT,
TokenType.UPDATE,
TokenType.VOLATILE,
TokenType.WINDOW,
*CREATABLES,
Expand Down Expand Up @@ -3044,7 +3045,7 @@ def _parse_column_ops(self, this: t.Optional[exp.Expression]) -> t.Optional[exp.
else exp.Literal.string(value)
)
else:
field = self._parse_field(anonymous_func=True)
field = self._parse_field(anonymous_func=True, any_token=True)

if isinstance(field, exp.Func):
# bigquery allows function calls like x.y.count(...)
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/identity.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ a.B()
a['x'].C()
int.x
map.x
SELECT update
SELECT x.update
SELECT call.x
a.b.INT(1.234)
INT(x / 100)
Expand Down

0 comments on commit 146e66a

Please sign in to comment.