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 2021/12/29 06:42:34 UTC

[GitHub] [ignite-3] zstan commented on a change in pull request #520: IGNITE-16090 Query execution service should wait for distributed table being created

zstan commented on a change in pull request #520:
URL: https://github.com/apache/ignite-3/pull/520#discussion_r776174007



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SqlSchemaManagerImpl.java
##########
@@ -64,6 +76,30 @@ public SchemaPlus schema(@Nullable String schema) {
         return schema != null ? calciteSchema.getSubSchema(schema) : calciteSchema;
     }
 
+    /** {@inheritDoc} */
+    @Override
+    @NotNull
+    public InternalIgniteTable tableById(IgniteUuid id) {
+        ensureTableUpToDate(id);
+
+        InternalIgniteTable table = tablesById.get(id);
+
+        if (table == null) {
+            throw new IgniteInternalException(
+                    LoggerMessageHelper.format("Table not found [tableId={}]", id));
+        }
+
+        return table;
+    }
+
+    private void ensureTableUpToDate(IgniteUuid id) {

Review comment:
       "UpToDate" confusing a bit, everything is relative ) possibly : ensureTableOperable ?




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