Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.35.0
Description
I used the json_value function to parse json values. And I found calcite's json_value function does not cache the dejsonized objects, which could cause some performance issue in situation below as the dejsonize function being called repeatedly unnecessarily.
select json_value(A, 'xxx'), json_value(A, 'yyy'), json_value(A, 'zzz'),... from some_table;
As project like flink uses the json_value to codegen it's own json_value function, I think this could cause a bad performance for users. So I suggest to introduce a cache in
org.apache.calcite.runtime.JsonFunctions#dejsonize
and the solution is very common in projects like hive
and of course, this feature can be turned on only some certain config is setted. And if this is acceptable, I think I can take the ticket. thx
Attachments
Issue Links
- is related to
-
CALCITE-5914 Cache compiled regular expressions in SQL function runtime
- Closed
- links to