Description
The example below demonstrates the issue:
> select from_csv('1', 'a INT', named_struct('mode', 'PERMISSIVE')) org.apache.spark.sql.AnalysisException { "errorClass" : "LEGACY", "messageParameters" : { "message" : "Must use a map() function for options.; line 1 pos 7" } }
and
> select to_csv(named_struct('a', 1, 'b', 2), map('mode', 1)); org.apache.spark.sql.AnalysisException { "errorClass" : "LEGACY", "messageParameters" : { "message" : "A type of keys and values in map() must be string, but got map<string,int>.; line 1 pos 7" } }