apache / apache/datafusion-sqlparser-rs
Comment handling
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
I've been working on [a SQL formatter](https://github.com/maxcountryman/forma) that leverages this library extensively. One problem with using `sqlparser-rs` right now is that comments are treated like whitespace and removed from the AST. I'm curious if there would be any interest in bringing comments into the AST? Perhaps this could be optional, since I imagine it's not terribly useful for most cases.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by examining sqlparser-rs's lexer, parser, and AST handling to establish how comments are currently discarded and how optional retention could fit. Done would require a settled design for opt-in comment representation in the AST, with behavior suitable for the linked SQL formatter; the issue names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100