Itzdhruvpatel commented on issue #18913:
URL: https://github.com/apache/datafusion/issues/18913#issuecomment-3572195371

   I appreciate you reporting this.  The reason for the error is that 
DataFusion's current implementation of the `MAP()` function expects both 
arguments to be list types (list, large_list, or fixed_size_list) rather than 
scalar strings (Utf8).  Thus, a type mismatch causes the syntax `MAP('type', 
'test')` to fail.
   
   Workaround:
   Use arrays to construct the map:
   sql
   SELECT MAP(ARRAY['type'], ARRAY['test']);
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to