yashmayya commented on code in PR #16683:
URL: https://github.com/apache/pinot/pull/16683#discussion_r2298629218


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/JsonExtractScalarTransformFunction.java:
##########
@@ -361,7 +361,17 @@ public int[][] transformToIntValuesMV(ValueBlock 
valueBlock) {
       int numValues = result.size();
       int[] values = new int[numValues];
       for (int j = 0; j < numValues; j++) {
-        values[j] = result.get(j);
+        Integer value = result.get(j);
+        if (value == null) {
+          if (_defaultValue != null) {
+            value = ((Number) _defaultValue).intValue();
+          } else {
+            throw new IllegalArgumentException(
+                "At least one of the resolved JSON arrays include nulls, which 
is not supported in Pinot. "
+                    + "Consider setting a default value as the forth argument 
of jsonextractscalar.");

Review Comment:
   ```suggestion
               throw new IllegalArgumentException(
                   "At least one of the resolved JSON arrays include nulls, 
which is not supported in Pinot. "
                       + "Consider setting a default value as the fourth 
argument of jsonExtractScalar.");
   ```



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

Reply via email to