apache / apache/datafusion-sqlparser-rs

Improve performance by reducing string copies

Aperta
#2,036 15 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
3.5k
Fork
772
Merge medio
4g 9h
PR unite (30g)
17

Descrizione

@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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia leggendo il post del blog di Databend collegato e la issue #1558 correlata, quindi analizza i percorsi del lexer e della gestione della proprietà dei token per identificare dove vengono copiate le stringhe. Il lavoro è completato quando le copie di stringhe evitabili sono ridotte, il comportamento del parser è preservato e l’impatto sulle prestazioni è validato con i test o benchmark esistenti del progetto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
compilers
Tipo di issue
Refactoring
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.