richardstartin commented on a change in pull request #7707: URL: https://github.com/apache/pinot/pull/7707#discussion_r744595934
########## 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; + if (!(ref instanceof int[]) || ((int[]) ref).length < numDocs) { Review comment: Maybe this needs a different approach - one of these is created per segment, so we should construct all literals in the scope of the query context, then we don't care about the footprint of a single instance. -- 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