tkalkirill commented on code in PR #2441:
URL: https://github.com/apache/ignite-3/pull/2441#discussion_r1293379887
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -118,6 +115,9 @@ public class SqlQueryProcessor implements QueryProcessor {
/** Size of the table access cache. */
private static final int TABLE_CACHE_SIZE = 1024;
+ /** Size of the schema cache. */
Review Comment:
What size or what? bytes? items?
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/util/StatementChecker.java:
##########
@@ -376,16 +369,17 @@ protected void checkRel(IgniteRel igniteRel, IgniteSchema
schema) {
}
private IgniteSchema createSchema() {
- IgniteSchema schema = new IgniteSchema("PUBLIC");
- this.initSchema.accept(schema);
+ List<IgniteTable> tables = new ArrayList<>();
for (Map.Entry<String, Function<TestBuilders.TableBuilder, TestTable>>
entry : testTables.entrySet()) {
String tableName = entry.getKey();
Function<TableBuilder, TestTable> addTable = entry.getValue();
TestTable table =
addTable.apply(TestBuilders.table().name(tableName));
- schema.addTable(table);
+
+ tables.add(table);
}
- return schema;
+
+ return new IgniteSchema("PUBLIC", 0, tables);
Review Comment:
Maybe `CatalogService.DEFAULT_SCHEMA_NAME` ?
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutableTableRegistryImpl.java:
##########
@@ -138,4 +167,8 @@ public CompletableFuture<ColocationGroup>
fetchColocationGroup() {
});
}
}
+
+ private static long cacheKey(int schemaVersion, int tableId) {
Review Comment:
Why not use an object with fields? In any case, there will be boxing. It
will be better to read the code, I think we will deal with optimization later.
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutableTableRegistryImpl.java:
##########
@@ -50,7 +50,7 @@ public class ExecutableTableRegistryImpl implements
ExecutableTableRegistry, Sch
private final HybridClock clock;
- final ConcurrentMap<Integer, CompletableFuture<ExecutableTable>>
tableCache;
+ final ConcurrentMap<Long, CompletableFuture<ExecutableTable>> tableCache;
Review Comment:
Can you add a description to the map? And what is the display here? table id
to table?
--
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]