apache / apache/datafusion-sqlparser-rs

Question on: `visit_expressions_mut` for alias expr

未关闭
#1,475 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
3.5k
派生
772
平均合并
4 天 9 小时
30 天内合并 PR
17

描述

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?

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 projection 上的 visit_expressions_mut 开始,检查 ExprWithAlias 的 VisitorMut derive 如何处理 alias 表达式。重现 SQL 示例,然后确定 alias 重命名是否按预期被访问;如果该行为是 bug,则添加或更新覆盖范围;payload 未指定文件或测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
rust, sql
领域
databases
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。