[
https://issues.apache.org/jira/browse/FLINK-41576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148137#comment-18148137
]
Sergey Nuyanzin commented on FLINK-41576:
-----------------------------------------
Merged as.
[66ffaab1c2f9705d6210234912e3c4bb0517a39b|https://github.com/apache/flink/commit/66ffaab1c2f9705d6210234912e3c4bb0517a39b]
> Skip ObjectMapper in JSON_STRING for string arguments
> -----------------------------------------------------
>
> Key: FLINK-41576
> URL: https://issues.apache.org/jira/browse/FLINK-41576
> Project: Flink
> Issue Type: Improvement
> Components: API / Core, Table SQL / Runtime
> Reporter: Sergey Nuyanzin
> Assignee: Sergey Nuyanzin
> Priority: Major
> Labels: pull-request-available
>
> For a STRING/CHAR argument, JSON_STRING serializes the value through a
> Jackson TextNode and ObjectMapper for every record. That includes a pointless
> treeToValue conversion, creating a generator, and a per-char escape loop.
> With 100-char strings, this took about 53% of the CPU time in SELECT
> JSON_STRING(s) FROM t. Most of it was the fixed cost of each call, not the
> escaping.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)