Jackie-Jiang commented on a change in pull request #6651:
URL: https://github.com/apache/incubator-pinot/pull/6651#discussion_r589842243
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/JsonExtractScalarTransformFunction.java
##########
@@ -131,7 +131,7 @@ public TransformResultMetadata getResultMetadata() {
final String[] stringValuesSV =
_jsonFieldTransformFunction.transformToStringValuesSV(projectionBlock);
final int[] results = new int[projectionBlock.getNumDocs()];
for (int i = 0; i < results.length; i++) {
- Object read = JsonPath.read(stringValuesSV[i], _jsonPath);
+ Object read =
JsonPath.using(JSON_PARSER_CONFIG).parse(stringValuesSV[i]).read(_jsonPath);
Review comment:
It's just one single object on top of the Configuration which can be
reused. I would not worry about the memory overhead of one single object. Also,
it should never be initialized if this function is never used thus this class
is not loaded.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]