LucaCappelletti94 opened a new pull request, #2350: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2350
Same family as #2344 and #2349. A reserved keyword in field position (e.g. `NOT` in `.not-b.not-b...`) drives `parse_prefix` -> `parse_not` -> `parse_subexpr`, re-walking the chain at every segment and doubling the work. The result is always rejected (`UnaryOp`), so the speculation is wasted, and `parse_identifier` in the existing None branch produces the same `Identifier` directly. The solution I identified is to skip the speculative `parse_prefix` in `parse_compound_expr` when the next token is a `Word` not followed by `(`. Surfaced by subql fuzzing on a 527 B input that took 2.65 s and now takes 270 us. | N | before | after | | - | ------ | ----- | | 5 | 63.3 us | 8.06 us | | 10 | 1.97 ms | 15.1 us | | 15 | 65.3 ms | 22.4 us | -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
