Skip to content

Fix panic on incomplete REGEXP/MATCH expressions in SQLite dialect#2197

Merged
iffyio merged 2 commits intoapache:mainfrom
LucaCappelletti94:crash-sqlite
Feb 7, 2026
Merged

Fix panic on incomplete REGEXP/MATCH expressions in SQLite dialect#2197
iffyio merged 2 commits intoapache:mainfrom
LucaCappelletti94:crash-sqlite

Conversation

@LucaCappelletti94
Copy link
Contributor

Parsing incomplete REGEXP or MATCH expressions (e.g. SELECT 1 REGEXP) would panic due to an .unwrap() on parse_expr() in the SQLite dialect's parse_infix method.

Fix

Replaced the .unwrap() with proper error propagation so the parser returns a ParserError instead of panicking.

Tests

Added assertions that SELECT 1 REGEXP and SELECT 1 MATCH produce errors.

@LucaCappelletti94 LucaCappelletti94 marked this pull request as ready for review February 5, 2026 23:55
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @LucaCappelletti94!

@iffyio iffyio added this pull request to the merge queue Feb 7, 2026
Merged via the queue into apache:main with commit 329a94c Feb 7, 2026
10 checks 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.

2 participants