You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but I failed, because alias can be complex, we hard to parse it and separate qualifier and name.
such as above code will fail in expr like alias is Cast(t1.a as int)
So, I proposal to add a DFField in Expr::Alias, so we will get DFField of Expr::Alias directly
Is your feature request related to a problem or challenge?
In the current optimization of Datafusion, we often use Expr::Alias instances for purposes:
parent plan
to correctly access the corresponding column.However, there is a vulnerability in this point 3. When an alias contains a qualifier, the schema cannot remain unchanged.
Here's an example:
Original Expr: column: t.c1 (field: qualifier: t, name: c1)
New Expr: c2 as t.c1 (its field will be: field: qualifier: None, name: t.c1)
Describe the solution you'd like
I try to match Expr::Alias and handle it in
to_field()
.such as
but I failed, because
alias
can be complex, we hard to parse it and separate qualifier and name.such as above code will fail in expr like
alias
isCast(t1.a as int)
So, I proposal to add a
DFField
in Expr::Alias, so we will getDFField
of Expr::Alias directlyDescribe alternatives you've considered
No response
Additional context
I find it in this PR #6595 (comment)
The text was updated successfully, but these errors were encountered: