apache / apache/datafusion-sqlparser-rs
Question on: `visit_expressions_mut` for alias expr
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
When I run `visit_expressions_mut` it works very well. However, I have no way to get to an alias expr, such as:
```sql
SELECT a.x, b.y AS myby, myfn(c.z) AS myfncall {
FROM t1
...
```
I pass the `projection` to `visit_expressions_mut` and I see the `CompoundIdentifier` and the `Function` expressions, but the alias rename does not come through. It seems like this is excluded, even though `ExprWithAlias` has a derive for `VisitorMut`. Is this intentional or a bug?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at visit_expressions_mut on the projection and inspect how the ExprWithAlias VisitorMut derive handles alias expressions. Reproduce the SQL example, then determine whether alias renames are visited as intended and add or update coverage if the behavior is a bug; the payload names no file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100