Jackie-Jiang commented on a change in pull request #7707: URL: https://github.com/apache/pinot/pull/7707#discussion_r744007398
########## File path: pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/LiteralTransformFunction.java ########## @@ -128,64 +122,88 @@ public Dictionary getDictionary() { @Override public int[] transformToIntValuesSV(ProjectionBlock projectionBlock) { - if (_intResult == null) { - _intResult = new int[DocIdSetPlanNode.MAX_DOC_PER_CALL]; + int numDocs = projectionBlock.getNumDocs(); + Object ref = _result; Review comment: Good point. Currently we create these LiteralTransformFunctions per literal per segment, which isn't really necessary. We can create them only once, and cache them into the `QueryContext` so that they can be shared across different literals and segments. That can be done in a separate PR -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org