You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "cecemei (via GitHub)" <gi...@apache.org> on 2025/09/24 00:26:42 UTC
[PR] Include IllegalArgumentException in vector processing error report (druid)
cecemei opened a new pull request, #18567:
URL: https://github.com/apache/druid/pull/18567
### Description
Include IllegalArgumentException in vector processing error report.
This PR has:
- [ ] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
--
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-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Include IllegalArgumentException in vector processing error report (druid)
Posted by "cecemei (via GitHub)" <gi...@apache.org>.
cecemei closed pull request #18567: Include IllegalArgumentException in vector processing error report
URL: https://github.com/apache/druid/pull/18567
--
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-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Include IllegalArgumentException in vector processing error report (druid)
Posted by "cecemei (via GitHub)" <gi...@apache.org>.
cecemei commented on code in PR #18567:
URL: https://github.com/apache/druid/pull/18567#discussion_r2376287247
##########
processing/src/main/java/org/apache/druid/math/expr/vector/FunctionErrorReportingExprVectorProcessor.java:
##########
@@ -57,7 +58,7 @@ public ExprEvalVector<T> evalVector(Expr.VectorInputBinding bindings)
.ofCategory(DruidException.Category.INVALID_INPUT)
.build(e, "Function[%s] encountered exception: %s", functionName, e.getMessage());
}
- catch (DruidException e) {
+ catch (DruidException | IAE e) {
Review Comment:
Updated to convert to DruidException
--
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-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Include IllegalArgumentException in vector processing error report (druid)
Posted by "gianm (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Include IllegalArgumentException in vector processing error report (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #18567:
URL: https://github.com/apache/druid/pull/18567#discussion_r2373993661
##########
processing/src/main/java/org/apache/druid/math/expr/vector/FunctionErrorReportingExprVectorProcessor.java:
##########
@@ -57,7 +58,7 @@ public ExprEvalVector<T> evalVector(Expr.VectorInputBinding bindings)
.ofCategory(DruidException.Category.INVALID_INPUT)
.build(e, "Function[%s] encountered exception: %s", functionName, e.getMessage());
}
- catch (DruidException e) {
+ catch (DruidException | IAE e) {
Review Comment:
I think it might be better to catch the IAE and convert it to a DruidException of type INVALID_INPUT instead, as it contains richer info for sending over the wire.
--
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-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Include IllegalArgumentException in vector processing error report (druid)
Posted by "cecemei (via GitHub)" <gi...@apache.org>.
cecemei commented on code in PR #18567:
URL: https://github.com/apache/druid/pull/18567#discussion_r2380216519
##########
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:
Make sense. Will deal in expression.
--
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-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org