You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "AMashenkov (via GitHub)" <gi...@apache.org> on 2023/08/14 11:04:06 UTC
[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2441: IGNITE-19497 Sql. Switch to SqlSchemaManager implementation on top of CatalogService
AMashenkov commented on code in PR #2441:
URL: https://github.com/apache/ignite-3/pull/2441#discussion_r1293323816
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutableTableRegistryImpl.java:
##########
@@ -77,6 +83,22 @@ public void onSchemaUpdated() {
tableCache.clear();
}
+ private CompletableFuture<ExecutableTable> loadTable(String tableName, TableDescriptor tableDescriptor) {
+ return tableManager.tableAsyncInternal(tableName.toUpperCase())
+ .thenApply(table -> {
+ InternalTable internalTable = table.internalTable();
+ SchemaRegistry schemaRegistry = schemaManager.schemaRegistry(table.tableId());
+ SchemaDescriptor schemaDescriptor = schemaRegistry.schema();
+ TableRowConverter rowConverter = new TableRowConverterImpl(schemaRegistry, schemaDescriptor, tableDescriptor);
+ ScannableTable scannableTable = new ScannableTableImpl(internalTable, rowConverter, tableDescriptor);
+
+ UpdatableTableImpl updatableTable = new UpdatableTableImpl(table.tableId(), tableDescriptor, internalTable.partitions(),
+ replicaService, clock, rowConverter, schemaDescriptor);
+
+ return new ExecutableTableImpl(internalTable, scannableTable, updatableTable);
Review Comment:
Agree, I think `UpdatableTableImpl` can be instantiated on-demand.
I won't do any unnecessary refactoring in this PR, or in feature branch.
--
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