cj-zhukov opened a new issue, #338:
URL: https://github.com/apache/datafusion-spark/issues/338

   ### Is your feature request related to a problem or challenge?
   
   #86 adds `to_json` for struct input with Spark's default options. Spark's 
`to_json` also accepts:
   
   - a map or array as the top-level value: `to_json(map('a', 1))` → `{"a":1}`, 
`to_json(array(named_struct('a', 1)))` → `[{"a":1}]`
   - an options map as a second argument: `ignoreNullFields`, 
`timestampFormat`, `dateFormat`, `timestampNTZFormat`, `timeZone`, `pretty`, ...
   
   Both are rejected at planning time today.
   
   Raised by @andygrove in the review of #86 as a follow-up.
   
   ### Describe the solution you'd like
   
   - Accept map and array input in `return_type` / `invoke_with_args`; the 
encoder already handles both when nested.
   - Accept the options argument as a literal map, and wire the supported 
options into `SparkJsonEncoderFactory` (formats, time zone, 
`ignoreNullFields`), with slt cases verified against Spark.
   
   ### Describe alternatives you've considered
   
   None.
   
   ### Additional context
   
   Follow-up to #86.


-- 
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