LucaCappelletti94 opened a new pull request, #2349:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2349

   `parse_function_args` wrapped `parse_expr` in `maybe_parse` for the `<expr> 
<op> <expr>` named-arg path on PostgreSQL/MSSQL, so rollback re-walked nested 
function calls and cost compounded to ~2^N. Same shape as #2344 at a different 
parser site.
   
   Fix: parse the leading expression once with `parse_wildcard_expr`, then 
`maybe_parse` only the `<op> <expr>` tail.
   
   Bench on `PostgreSqlDialect`:
   
   | n  | before  | after  |
   |----|---------|--------|
   | 5  | 78 us   | 15 us  |
   | 10 | 2.4 ms  | 29 us  |
   | 15 | 79 ms   | 42 us  |
   
   Adds a timeout-based regression test and criterion bench mirroring #2344.


-- 
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]

Reply via email to