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


##########
pinot-common/src/main/java/org/apache/pinot/common/function/FunctionInvoker.java:
##########
@@ -112,7 +113,12 @@ public void convertTypes(Object[] arguments) {
       PinotDataType argumentType = 
FunctionUtils.getArgumentType(argumentClass);
       Preconditions.checkArgument(parameterType != null && argumentType != 
null,
           "Cannot convert value from class: %s to class: %s", argumentClass, 
parameterClass);
-      arguments[i] = parameterType.convert(argument, argumentType);
+      try {
+        arguments[i] = parameterType.convert(argument, argumentType);
+      } catch (Exception e) {
+        String errorMsg = "Invalid conversion when calling " + _method + ": " 
+ e.getMessage();
+        throw QueryErrorCode.QUERY_EXECUTION.asException(errorMsg, e);
+      }

Review Comment:
   I'm not sure I agree that query processing related exceptions should ever be 
used in ingestion related error paths even if function related (since those are 
common components). But I'd prefer to not block this PR any longer, so we can 
discuss this further separately. 



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