[ 
https://issues.apache.org/jira/browse/CALCITE-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18069521#comment-18069521
 ] 

Danylo Naumenko commented on CALCITE-7455:
------------------------------------------

That's a great point! One clarification to make sure we are on the same page - 
I am suggesting to make the object mapper configurable, not necessarily change 
the default object mapper itself. By default, I would leave the object mapper 
to the one that's used now but allow users to override it if they need it.

Still, related to what you mention, I think it is a very good idea to mention 
the security implications in the docs of the new API (y)

> Allow configuring ObjectMapper for JSON functions
> -------------------------------------------------
>
>                 Key: CALCITE-7455
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7455
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Danylo Naumenko
>            Priority: Minor
>
> JsonFunctions currently uses a hardcoded JacksonJsonProvider with the default 
> ObjectMapper, so any Jackson module not registered by default is unavailable. 
> For example, passing a Java object with Optional fields to JSON_OBJECT fails 
> since serialization of Optional fields is not enabled by default. Registering 
> Jdk8Module on the ObjectMapper fixes this, but it looks like there's no way 
> to do that today.
> *Proposed solution:* provide a way to configure an ObjectMapper used by JSON 
> functions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to