datafusion: DataFrame parse_sql_expr does not handle aliases
Describe the bug
df.parse_sql_expr does not handle expression aliases, for expressions like
df.parse_sql_expr("col0 as new_col0")
it will return col(col0`) expression
To Reproduce
statement
df.parse_sql_expr("SUM(int_col) as sum_int_col")
from
can be used to demonstrate this issue
as return column has sum(?table?.int_col) as the name
Expected behavior
it is expected to have expression alias handled
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
I just see sqlparser release
0.52.0. (which was released 6 days ago 😄 )I will start working on that tomorrow.
It is on my queue: https://github.com/apache/datafusion-sqlparser-rs/issues/1423
Okay, then I will remove thing that doesn’t belong to pull request and submit pull request.
My bad, I thought it’s released
@milenkovicm Yes, I am interested in working on this issue.
I am waiting for next release of
sqlparser, soparse_expr_with_aliasmethod onsqlparser::parser::Parsercan be make public.Hey @Eason0729 any interested in continuing this issue?