richardstartin commented on a change in pull request #7707:
URL: https://github.com/apache/pinot/pull/7707#discussion_r744129157



##########
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:
       I'm ok with throwing an exception if the literal is used as the wrong 
type.




-- 
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

Reply via email to