You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/12/30 09:44:04 UTC

[GitHub] [ignite] ilhomu commented on a diff in pull request #10464: IGNITE-18458 Fixed NPE on DML on non-existed table

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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org