korlov42 commented on code in PR #2719:
URL: https://github.com/apache/ignite-3/pull/2719#discussion_r1368543347
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/SqlSchemaManagerImpl.java:
##########
@@ -98,7 +99,63 @@ public CompletableFuture<Void> schemaReadyFuture(int
version) {
return catalogManager.catalogReadyFuture(version);
}
- private static SchemaPlus createSqlSchema(int catalogVersion,
CatalogSchemaDescriptor schemaDescriptor) {
+ @Override
+ public IgniteTable table(int schemaVersion, int tableId) {
+ return tableCache.get(tableCacheKey(schemaVersion, tableId), key -> {
+ SchemaPlus rootSchema = schemaCache.get(schemaVersion);
+
+ if (rootSchema != null) {
+ for (String name : rootSchema.getSubSchemaNames()) {
+ SchemaPlus subSchema = rootSchema.getSubSchema(name);
+
+ assert subSchema != null : name;
+
+ IgniteSchema schema = subSchema.unwrap(IgniteSchema.class);
+
+ assert schema != null : "unknown schema " + subSchema;
+
+ IgniteTable table = schema.getTable(tableId);
+
+ if (table != null) {
Review Comment:
this method is used during execution phase. Why did you mention
PlanningContext? PlanningContext is used during planning (aka preparing, see
PrepareService)
--
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]