apache / apache/datafusion

Show function's alias name in the output column

未关闭
#17,469 6 条评论 0 个 reaction 已指派 1 人 已被 @devampatel03 认领 在 GitHub 查看
enhancement
主要语言
Rust
星标
9.3k
派生
2.4k
平均合并
3 天 11 小时
30 天内合并 PR
360

描述

### Is your feature request related to a problem or challenge?

When executing `select date_format(values, patterns) from t`, people often expect the output column to be named with the function name `date_format`. However, the actual is `to_char`:

https://github.com/apache/datafusion/blob/9942ecd4ac791c26546db8d8bf6ae674006a49fc/datafusion-examples/examples/date_time_functions.rs#L486-L505

This might cause some confusion, if people don't know `date_format` is aliased to `to_char`, and brings poor experience.

### Describe the solution you'd like

As title, instead of showing the actual executing function's name("`to_char`"), showing its alias("`date_format`").

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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