• Sources: DuckDB blog post, HN discussion
  • Summary: The parser front end changes while the binder and the rest of the query pipeline keep operating on the same internal AST, and DuckDB states existing queries should continue working. The concrete defect the rewrite fixed is exponential parse time on malformed input, where on the experimental parser shipped in v1.5 each additional unmatched opening parenthesis roughly doubled parse time, at 5.303 seconds for 18 and 10.640 seconds for 19, and packrat memoization brought 19 down to 0.001 seconds. The extension API shown is a preview that may change before release, and it lets an extension register grammar rules against DuckDB's own rules and reuse existing transformers.
  • Why it matters: Extension grammar rules replace today's fallback parsers, which have to reimplement the surrounding SQL and cannot be combined with each other.
  • Follow-up: Track the DuckDB v2.0 release and the final form of the parser extension API.

send feedback on this story