korlov42 commented on code in PR #7303:
URL: https://github.com/apache/ignite-3/pull/7303#discussion_r2650642359


##########
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:
   All expressions used to throw public `SqlException` with `Sql.RUNTIME_ERR` 
code. I introduced specific exception to make possible context-dependent 
remapping. Here, I restore the original behavior: everything thrown from 
expressions should be represented by `SqlException(Sql.RUNTIME_ERR)`.
   
   I'm not sure if we need to convert every exception, but I believe this is 
out of scope of current PR



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

Reply via email to