gortiz commented on code in PR #15037:
URL: https://github.com/apache/pinot/pull/15037#discussion_r1975547455
##########
pinot-common/src/main/java/org/apache/pinot/common/function/FunctionInvoker.java:
##########
@@ -112,7 +113,11 @@ 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) {
+ throw QueryErrorCode.QUERY_EXECUTION.asException("Invalid conversion:
" + e.getMessage(), e);
Review Comment:
I'm modifying this to include the method's name. As for arguments... I'm not
sure. The arguments here are the actual values, not the logical expressions.
They may leak sensitive information in the logs. In fact, I was thinking of
removing the exception message as well, but that would give us an error that is
not very useful.
--
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]