apache / apache/datafusion-sqlparser-rs
Improve performance by reducing string copies
- 主要语言
- Rust
- 星标
- 3.5k
- 派生
- 772
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 17
描述
@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/
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
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先阅读链接的 Databend 博客文章和相关 issue #1558,然后检查 lexer 和 token 所有权路径,以确定字符串在哪里被复制。完成的标准是减少可避免的字符串复制,同时保持 parser 行为不变,并使用项目现有的测试或 benchmark 验证性能影响。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- compilers
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100