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
For example, mysql use the whole cast expression as column name, like CAST(Int64(10) AS Int8) instead of Int64(10). In this way, the column name of cast expression will be more precise, and also this can bypass the duplicate column name error.
remove the unique column name validation
In mysql and sql server, query support same column name. So I think we can remove the unique column name validation to make same column name coexist.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
This problem origin from dask-contrib/dask-sql#948, which can be minimally reproduced by
The sql above will cause the duplicate column name error. And this is because
https://github.com/apache/arrow-datafusion/blob/224c682101949da57aebc36e92e5a881ef3040d4/datafusion/expr/src/expr.rs#L1203-L1210
https://github.com/apache/arrow-datafusion/blob/224c682101949da57aebc36e92e5a881ef3040d4/datafusion/expr/src/logical_plan/builder.rs#L925-L948
Describe the solution you'd like
There are two soluntions here:
For example, mysql use the whole cast expression as column name, like
CAST(Int64(10) AS Int8)
instead ofInt64(10)
. In this way, the column name of cast expression will be more precise, and also this can bypass the duplicate column name error.In mysql and sql server, query support same column name. So I think we can remove the unique column name validation to make same column name coexist.
The text was updated successfully, but these errors were encountered: