Search in sources :

Example 1 with SqlConnectorCache

use of com.hazelcast.jet.sql.impl.connector.SqlConnectorCache 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);
}
Also used : TablesStorage(com.hazelcast.jet.sql.impl.schema.TablesStorage) TableResolverImpl(com.hazelcast.jet.sql.impl.schema.TableResolverImpl) SqlConnectorCache(com.hazelcast.jet.sql.impl.connector.SqlConnectorCache)

Example 2 with SqlConnectorCache

use of com.hazelcast.jet.sql.impl.connector.SqlConnectorCache 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);
}
Also used : TablesStorage(com.hazelcast.jet.sql.impl.schema.TablesStorage) TableResolverImpl(com.hazelcast.jet.sql.impl.schema.TableResolverImpl) SqlConnectorCache(com.hazelcast.jet.sql.impl.connector.SqlConnectorCache) Before(org.junit.Before)

Aggregations

SqlConnectorCache (com.hazelcast.jet.sql.impl.connector.SqlConnectorCache)2 TableResolverImpl (com.hazelcast.jet.sql.impl.schema.TableResolverImpl)2 TablesStorage (com.hazelcast.jet.sql.impl.schema.TablesStorage)2 Before (org.junit.Before)1