You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "rpuch (via GitHub)" <gi...@apache.org> on 2023/09/29 14:44:50 UTC
[GitHub] [ignite-3] rpuch commented on a diff in pull request #2643: IGNITE-20518 Use CatalogService in JdbcMetadataCatalog
rpuch commented on code in PR #2643:
URL: https://github.com/apache/ignite-3/pull/2643#discussion_r1341455472
##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/JdbcMetadataCatalog.java:
##########
@@ -182,28 +202,24 @@ public CompletableFuture<Collection<String>> getSchemasMeta(String schemaNamePtr
schemas.add(DEFAULT_SCHEMA_NAME);
}
- return tables.tablesAsync().thenApply(tablesList ->
- tablesList.stream()
+ return tablesAtNow().thenApply(tables ->
+ tables.stream()
.map(tbl -> DEFAULT_SCHEMA_NAME)
.filter(schema -> matches(schema, schemaNameRegex))
- .collect(Collectors.toCollection(() -> schemas))
+ .collect(toCollection(() -> schemas))
);
}
/**
- * Creates primary key metadata from table object.
+ * Creates primary key metadata from a table descriptor.
*
* @param tbl Table.
* @return Jdbc primary key metadata.
*/
- private JdbcPrimaryKeyMeta createPrimaryKeyMeta(Table tbl) {
- final String keyName = PK + tbl.name();
-
- SchemaRegistry registry = ((TableImpl) tbl).schemaView();
+ private JdbcPrimaryKeyMeta createPrimaryKeyMeta(CatalogTableDescriptor tbl) {
+ String keyName = PK + tbl.name();
Review Comment:
Probably, when we rename a table, we'll also (atomically) rename the corresponding PK. Should I file an issue?
--
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