apache / apache/datafusion-sqlparser-rs

Improve performance by reducing string copies

Open
#2,036 15 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.5k
Forks
772
Avg merge
4d 9h
Merged PRs (30d)
17

Description

@Omega359 [mentioned in discord](https://discord.com/channels/885562378132000778/1344430130252218439/1415763431516278794) a blog post by the Databend folks about how they wrote a replacement of sqlparser-rs for their system

https://www.databend.com/blog/category-engineering/2025-09-10-query-parser/

Image

One thing they cite is the fact that sqlparser-rs often copies strings, even when this could be avoided

If anyone cares, we can probably avoid copying strings, someone just has to care enough to thread the lifetime information through all the tokens (or maybe use an Arc w/ an offset)

@AdamGS mentioned he might be interested in trying this

This could possibly be related to another ticket here:
- https://github.com/apache/datafusion-sqlparser-rs/issues/1558

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked Databend blog post and related issue #1558, then inspect the lexer and token ownership paths to identify where strings are copied. Done means reducing avoidable string copies while preserving parser behavior and validating the performance impact with the project’s existing tests or benchmarks.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.