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


##########
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:
   AFAIK, when ingestion calls this code, what they are using is to evaluate 
some built-in functions to apply transformations. I think it makes sense to 
receive query exceptions in that case. Don't you?



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