Closed goldmedal closed 1 month ago
take
I found the MAP
literal isn't supported by the sqlparser-rs
. I think we need to implement this syntax on the sqlparser-rs
side first. However, I think I can have a PR for moving make_map
to ExprPlanner first.
What do you think? @jayzhan211
The part of moving MAKE_MAP
has been solved by #11452. I'll start to implement the MAP literal after https://github.com/sqlparser-rs/sqlparser-rs/pull/1344
Is your feature request related to a problem or challenge?
Based on the discussion in https://github.com/apache/datafusion/issues/11268#issuecomment-2211125762, we will support the MAP literal to create a map value. Referring to the DuckDB syntax, we can use syntax like:
Describe the solution you'd like
After #11361, we now have two functions:
map
andmake_map
. We can useUserDefinedSQLPlanner
to implement the proposed syntax and rewrite it to themap
function. As @jayzhan211 mentioned in https://github.com/apache/datafusion/pull/11361#issuecomment-2221710127, we can also useExprPlanner
to handle themake_map
function. Sincemake_map
is less efficient than themap
function, we should retain only the fastermap
scalar function implementation. For more details, see the previous discussions and benchmark results in #11361.Describe alternatives you've considered
No response
Additional context
No response