You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DuckDB: exponential parse time on unclosed nested qualified calls with a named argument (regression from #2685) #3002
Unclosed nested qualified calls whose argument is name = value (or name := value) double the parse time per level in DuckDB. Before #2685 (0.63.0) the same input failed in microseconds:
SELECT u.u(k=u.u(k=u.u(k=1 -- nested n levels, no closing parentheses
bytes main 0.63.0
n=16 104 197 ms 0.034 ms
n=20 128 3.1 s 0.032 ms
n=22 140 12.7 s 0.037 ms
The closed form, the unqualified form u(k=u(k=...1 and other dialects stay linear.
use sqlparser::{dialect::DuckDbDialect, parser::Parser};let sql = format!("SELECT {}1","u.u(k=".repeat(22));let _ = Parser::parse_sql(&DuckDbDialect{},&sql);// error after ~13 s
Tested on main 9429cd3 and crates.io 0.64.0 and 0.63.0.
Found with a coverage-guided performance fuzzer; I used AI assistance for triage and verified every case above.
Activity