AMashenkov commented on code in PR #7303:
URL: https://github.com/apache/ignite-3/pull/7303#discussion_r2646895938
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExchangeServiceImpl.java:
##########
@@ -156,9 +158,18 @@ private void onMessage(InternalClusterNode node,
QueryBatchRequestMessage msg) {
outbox.onRequest(node.name(), msg.amountOfBatches());
}
} catch (Throwable e) {
- outbox.onError(e);
+ Throwable toUse;
+ //noinspection InstanceofCatchParameter
+ if (e instanceof ExpressionEvaluationException) {
+ toUse = SqlExceptionMapperUtil.mapToPublicSqlException(e);
+ } else {
+ toUse = e;
+ }
+
+ outbox.onError(toUse);
Review Comment:
This change looks unclear to me.
It causes next questions:
* what are other exceptions we can get here?
* what are places, where we should map newly added exceptions?
Should we pass all exceptions to
`SqlExceptionMapperUtil.mapToPublicSqlException` instead (maybe with a comment
like "we have to pass correct error code to remote side").
--
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]