use of com.hazelcast.sql.impl.optimizer.PlanCheckContext in project hazelcast by hazelcast.
the class PlanCacheChecker method check.
public void check() {
if (planCache.size() == 0) {
return;
}
// Collect object IDs
SqlCatalog catalog = new SqlCatalog(tableResolvers);
Set<PlanObjectKey> objectKeys = new HashSet<>();
for (Map<String, Table> tableMap : catalog.getSchemas().values()) {
for (Table table : tableMap.values()) {
PlanObjectKey objectKey = table.getObjectKey();
if (objectKey != null) {
objectKeys.add(objectKey);
}
}
}
// Prepare partition distribution
Map<UUID, PartitionIdSet> partitions = QueryUtils.createPartitionMap(nodeEngine, null, false);
// Do check
planCache.check(new PlanCheckContext(objectKeys, partitions));
}
Aggregations