chrisdutz opened a new pull request, #19175: URL: https://github.com/apache/iotdb/pull/19175
## Description Both SQL parsers try the faster SLL prediction mode first and fall back to full LL on a syntax error, and the LL stage reports the error. The SLL stage still used: - the default error strategy (tree model), or - the reporting strategy (table model). Both run `sync()` at every rule and attempt error recovery, whose result is thrown away anyway. The changes: - `StatementGenerator`: the SLL parser uses `BailErrorStrategy`. - `SqlParser` (table model): the SLL stage uses `BailErrorStrategy`; before the LL stage the parser switches back to the existing reporting strategy. The SLL stage now also catches the `ParseCancellationException` that the bail strategy throws. Parse results and error messages are unchanged. I compared 28 tree and 24 table statements, valid and invalid; `SqlParserErrorHandlerTest` and `StatementGeneratorTest` pass. ## Performance SQL inserts on a standalone node, mean of several runs with a 95 % confidence interval: | Model | Throughput | Server CPU per value | |---|---|---| | Tree | +6.4 % [+2.0, +10.7] | -6.3 % | | Table | +16.3 % [+11.2, +21.5] | -13.5 % | ## Tests 398 tests in the parser and relational analyzer packages ran. One fails: `ExtractExpressionTest.constantFoldTest`, which fails the same way on master without this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
