apache / apache/datafusion-sqlparser-rs
Improve performance by reducing string copies
- Vorherrschende Sprache
- Rust
- Sterne
- 3.5k
- Forks
- 772
- Ø Merge
- 4 T. 9 Std.
- Gemergte PRs (30 T.)
- 17
Beschreibung
@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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, den verlinkten Databend-Blogbeitrag und das zugehörige Issue #1558 zu lesen, und untersuche anschließend die Pfade von lexer und Token-Ownership, um festzustellen, wo Strings kopiert werden. Als erledigt gilt die Aufgabe, wenn vermeidbare String-Kopien reduziert wurden, das Parserverhalten erhalten bleibt und die Auswirkungen auf die Performance mit den bestehenden Tests oder Benchmarks des Projekts validiert wurden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- compilers
- Issue-Typ
- Refactoring
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100