apache / apache/datafusion-sqlparser-rs
feat: use EnumsAsInner to extract enum variants
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
It is quite boring to extract specific enum variant using pattern match. I would like to derive all enums with EnumsAsInner. So I can use expr.as_function(), expr.as_ident() ... much simpler than `if let Expr::Function(f) = expr { ... }`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the repository's enum definitions and existing pattern matches for extracting variants, then review how EnumsAsInner would apply across them. Confirm the generated accessors cover the requested variants, including as_function() and as_ident(), and add or update tests demonstrating the simpler extraction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100