Sergey Nuyanzin created FLINK-41576:
---------------------------------------
Summary: 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
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)