Replace node-sql-parser with sqlparser-ts #61111
Open
+219
−41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Why
node-sql-parseradds a massive ~88 MB footprint to the package just to handle SQL string detection.How
sqlparser-ts, a library I develop and maintain, which brings the power of Rust’s sqlparser from Apache DataFusion to JS/TS via WebAssembly. It offers superior performance with zero JS/TS dependencies.detectLanguage.tsto usesqlparser-ts'svalidate()function instead ofnode-sql-parser'sparse()for SQL detectionBenchmark
This optimization slashed the package size by 93% and boosted validation speed by 5.4x, while delivering superior SQL compatibility and maintaining stable load times compare to pure js implementation.
More detailed benchmark between
sqlparser-tsandnode-sql-parser--> https://github.com/guan404ming/sqlparser-ts/tree/main/benchmarkBundle Analyzer Treemap
before
after
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code with Opus 4.5 following the guidelines
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.