lowka commented on code in PR #2601:
URL: https://github.com/apache/ignite-3/pull/2601#discussion_r1336912047


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlValidator.java:
##########
@@ -190,6 +192,27 @@ public void validateMerge(SqlMerge call) {
         }
     }
 
+    private IgniteTable getTable(SqlIdentifier identifier) {
+        SqlValidatorTable table = 
getCatalogReader().getTable(identifier.names);
+
+        if (table == null) {
+            throw newValidationError(identifier, 
RESOURCE.objectNotFound(identifier.toString()));
+        }
+
+        return getIgniteTable(identifier, table);
+    }
+
+    private IgniteTable getIgniteTable(SqlIdentifier identifier, 
SqlValidatorTable table) {
+        IgniteDataSource dataSource = table.unwrap(IgniteDataSource.class);
+        assert dataSource != null;
+
+        if (dataSource instanceof IgniteSystemView) {
+            throw newValidationError(identifier, 
IgniteResource.INSTANCE.systemViewIsNotModifiable(identifier.toString()));

Review Comment:
   Renamed to `getTableForModification`.



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