Skip to content

Conversation

@bombsimon
Copy link
Contributor

Since v0.55.0, qualified column names using SQL keywords failed to parse. For example, T.interval in PARTITION BY T.key, T.interval ORDER BY ... was incorrectly interpreted as an INTERVAL expression instead of a column.

In 3e90a18 changed parse_compound_expr to use parse_subexpr() for tokens after ., causing keywords like INTERVAL, CASE, CAST, etc. to be treated as expression starters.

Explicitly handle Token::Word in parse_compound_expr by treating it as an identifier. If followed by ( (excluding the (+) outer join operator), parse as a method call. This restores the original behavior where words after . were always converted to identifiers.

Since v0.55.0, qualified column names using SQL keywords failed to
parse. For example, `T.interval` in `PARTITION BY T.key, T.interval
ORDER BY ...` was incorrectly interpreted as an INTERVAL expression
instead of a column.

In `3e90a18` changed `parse_compound_expr` to use `parse_subexpr()` for
tokens after `.`, causing keywords like INTERVAL, CASE, CAST, etc. to be
treated as expression starters.

Explicitly handle `Token::Word` in `parse_compound_expr` by treating it
as an identifier. If followed by `(` (excluding the `(+)` outer join
operator), parse as a method call. This restores the original behavior
where words after `.` were always converted to identifiers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant