use of com.hazelcast.jet.sql.impl.schema.TablesStorage in project hazelcast by hazelcast.
the class CalciteSqlOptimizer method mappingCatalog.
private static TableResolverImpl mappingCatalog(NodeEngine nodeEngine) {
TablesStorage tablesStorage = new TablesStorage(nodeEngine);
SqlConnectorCache connectorCache = new SqlConnectorCache(nodeEngine);
return new TableResolverImpl(nodeEngine, tablesStorage, connectorCache);
}
use of com.hazelcast.jet.sql.impl.schema.TablesStorage in project hazelcast by hazelcast.
the class SqlIndexResolutionTest method before.
@Before
public void before() throws Exception {
nodeEngine = getNodeEngine(instance());
resolver = new TableResolverImpl(nodeEngine, new TablesStorage(nodeEngine), new SqlConnectorCache(nodeEngine));
mapName = randomName();
indexName = randomName();
String[] indexAttributes = composite ? new String[] { "field1", "field2" } : new String[] { "field1" };
valueClass = createBiClass(type1, type2);
value = createBiValue(valueClass, 1, type1.valueFrom(), composite ? type2.valueFrom() : null);
map = instance().getMap(mapName);
createMapping(mapName, int.class, value.getClass());
createIndex(indexName, mapName, indexType, indexAttributes);
}
Aggregations