You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "zstan (via GitHub)" <gi...@apache.org> on 2023/04/11 07:31:31 UTC
[GitHub] [ignite-3] zstan commented on a diff in pull request #1917: IGNITE-19116 Sql. Fixed UPDATE statement fails with NPE when table doesn't exist.
zstan commented on code in PR #1917:
URL: https://github.com/apache/ignite-3/pull/1917#discussion_r1162409001
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlValidator.java:
##########
@@ -169,6 +169,10 @@ protected SqlSelect createSourceSelectForUpdate(SqlUpdate call) {
final SqlIdentifier targetTable = (SqlIdentifier) call.getTargetTable();
final SqlValidatorTable table = getCatalogReader().getTable(targetTable.names);
+ if (table == null) {
+ throw newValidationError(call.getTargetTable(), RESOURCE.objectNotFound(targetTable.toString()));
Review Comment:
more clear to use : RESOURCE.tableNotFound ? I see that it throws not SqlValidatorException and additional fix possibly required, wdyt ? Also - is it correct to throw not wrapped calcite exception in public api, probably we need to mention some already defined issue here ?
--
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