xtern commented on code in PR #4179:
URL: https://github.com/apache/ignite-3/pull/4179#discussion_r1708711916


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/PlannerHelper.java:
##########
@@ -180,7 +180,7 @@ public static IgniteRel optimize(SqlNode sqlNode, 
IgnitePlanner planner) {
                 LOG.debug(planner.dump());
             }
 
-            if (ex instanceof CannotPlanException) {
+            if (ex instanceof CannotPlanException || ex instanceof 
SqlException) {

Review Comment:
   > why do u need such a change ? it work properly without it,
   
   Because this change fixes described problem.
   Please, try to run `ItCastToIntTest` WITHOUT this change and you'll see that 
the `explicitCastOfLiteralsOnSelectWithOverflow` test will fail.
   
   ```
   org.opentest4j.AssertionFailedError: Error code does not match. Expected: 
"SQL-7" actual: "CMN--1"
   ```



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