panbingkun commented on PR #48428:
URL: https://github.com/apache/spark/pull/48428#issuecomment-2412962146

   > sorry for naive question, any reason why `to_json` is not suitable for 
using `Invoke` & `RuntimeReplaceable`? I was checking proto equivalent function 
`toProtobuf` expression which extends `RuntimeReplaceable`
   
   If we use `Invoke` and `RuntimeReplaceable` to support `Codegen` for 
`to_json`, 
   - Do we need to create a `JacksonGenerator` every time? Based on my 
understanding, if we do this, the performance doesn't seem to be optimal.
   - If we only create `JacksonGenerator` once in `to_json`, then we have to 
pass it in the `Invoke` call, and we must make `JacksonGenerator` extend 
`Serializable`, which will cause more or less changes to the old logic. 
Variables that may be used in `Invoke`, such as `writer` and `converter`, all 
have similar issues.


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