ilhomu commented on code in PR #10464:
URL: https://github.com/apache/ignite/pull/10464#discussion_r1059314647


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PrepareServiceImpl.java:
##########
@@ -102,9 +102,14 @@ public PrepareServiceImpl(GridKernalContext ctx) {
                         "querySql=\"" + ctx.query() + "\"]", 
IgniteQueryErrorCode.UNSUPPORTED_OPERATION);
             }
         }
-        catch (ValidationException | CalciteContextException e) {
+        catch (CalciteContextException e) {
             throw new IgniteSQLException("Failed to validate query. " + 
e.getMessage(), IgniteQueryErrorCode.PARSING, e);
         }
+        catch (ValidationException e) {
+            String cause = e.getCause() == null ? e.getMessage() : 
e.getCause().getMessage();
+
+            throw new IgniteSQLException("Failed to validate query. " + cause, 
IgniteQueryErrorCode.PARSING, e);
+        }

Review Comment:
   imho, there is no need to have ValidationException at all. I have killed off 
it from the code.



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