gianm commented on code in PR #18567:
URL: https://github.com/apache/druid/pull/18567#discussion_r2377222822


##########
processing/src/main/java/org/apache/druid/math/expr/vector/FunctionErrorReportingExprVectorProcessor.java:
##########
@@ -57,6 +58,11 @@ public ExprEvalVector<T> evalVector(Expr.VectorInputBinding 
bindings)
                           .ofCategory(DruidException.Category.INVALID_INPUT)
                           .build(e, "Function[%s] encountered exception: %s", 
functionName, e.getMessage());
     }
+    catch (IAE e) {

Review Comment:
   IMO, this is better dealt with inside each expression.
   
   The idea with the code block here (and the equivalent one in `FunctionExpr`) 
is to pass through errors that the function clearly intended to be aimed at the 
end user (ExpressionValidationException, ExpressionProcessingException, 
DruidException, etc) and to map all others to an "unknown exception" message 
with the cause attached for debugging purposes.
   
   So, if an `IAE` is making it out here with a user-facing error message, I 
think it's a sign that the function that generated the IAE should improve its 
error handling.



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