Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

  • Remove query preprocessing (comment stripping, line joining)
  • Pass entire query file directly to parser.Parse()
  • Parser handles comments via lexer
  • Only check first statement's explain output
  • Fix nil pointer dereferences in parseSelectWithUnion
  • Add nil check in explainSelectWithUnionQuery
  • Mark tests causing infinite loops as skip
  • Skip parse_error tests when parser successfully parses

- Remove query preprocessing (comment stripping, line joining)
- Pass entire query file directly to parser.Parse()
- Parser handles comments via lexer
- Only check first statement's explain output
- Fix nil pointer dereferences in parseSelectWithUnion
- Add nil check in explainSelectWithUnionQuery
- Mark tests causing infinite loops as skip
- Skip parse_error tests when parser successfully parses
The expression parser could enter an infinite loop when parsing tokens
like EXCEPT, REPLACE, or LPAREN that have high precedence but only
apply to specific left-hand expressions (like asterisks).

Fix: Track parser position and break the loop if no tokens are consumed
during infix parsing, preventing infinite loops when infix operators
don't apply to the current expression.

This re-enables 14 tests that were previously marked as skip due to
causing infinite loops.
@kyleconroy kyleconroy merged commit 6af51af into main Dec 26, 2025
1 check passed
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.

3 participants