richardstartin commented on a change in pull request #7707:
URL: https://github.com/apache/pinot/pull/7707#discussion_r744820143
##########
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:
Please take a look now, this change now only consists of the size change
(plus allowing for racy writes while guaranteeing consistent reads) - the
caching is done in #7720
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]