yashmayya commented on code in PR #15037: URL: https://github.com/apache/pinot/pull/15037#discussion_r1984502472
########## 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: This is called in various ingestion paths as well, I don't think we should be using query execution error here. -- 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