Search in sources :

Example 1 with Table

use of com.hazelcast.sql.impl.schema.Table in project hazelcast by hazelcast.

the class CreateDagVisitor method onFullScan.

public Vertex onFullScan(FullScanPhysicalRel rel) {
    Table table = rel.getTable().unwrap(HazelcastTable.class).getTarget();
    collectObjectKeys(table);
    return getJetSqlConnector(table).fullScanReader(dag, table, rel.filter(parameterMetadata), rel.projection(parameterMetadata), rel.eventTimePolicyProvider());
}
Also used : HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable) Table(com.hazelcast.sql.impl.schema.Table) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable)

Example 2 with Table

use of com.hazelcast.sql.impl.schema.Table in project hazelcast by hazelcast.

the class CreateDagVisitor method onNestedLoopJoin.

public Vertex onNestedLoopJoin(JoinNestedLoopPhysicalRel rel) {
    assert rel.getRight() instanceof FullScanPhysicalRel : rel.getRight().getClass();
    Table rightTable = rel.getRight().getTable().unwrap(HazelcastTable.class).getTarget();
    collectObjectKeys(rightTable);
    VertexWithInputConfig vertexWithConfig = getJetSqlConnector(rightTable).nestedLoopReader(dag, rightTable, rel.rightFilter(parameterMetadata), rel.rightProjection(parameterMetadata), rel.joinInfo(parameterMetadata));
    Vertex vertex = vertexWithConfig.vertex();
    connectInput(rel.getLeft(), vertex, vertexWithConfig.configureEdgeFn());
    return vertex;
}
Also used : Vertex(com.hazelcast.jet.core.Vertex) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable) Table(com.hazelcast.sql.impl.schema.Table) VertexWithInputConfig(com.hazelcast.jet.sql.impl.connector.SqlConnector.VertexWithInputConfig) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable)

Example 3 with Table

use of com.hazelcast.sql.impl.schema.Table in project hazelcast by hazelcast.

the class CreateDagVisitor method onUpdate.

public Vertex onUpdate(UpdatePhysicalRel rel) {
    Table table = rel.getTable().unwrap(HazelcastTable.class).getTarget();
    Vertex vertex = getJetSqlConnector(table).updateProcessor(dag, table, rel.updates(parameterMetadata));
    connectInput(rel.getInput(), vertex, null);
    return vertex;
}
Also used : Vertex(com.hazelcast.jet.core.Vertex) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable) Table(com.hazelcast.sql.impl.schema.Table) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable)

Example 4 with Table

use of com.hazelcast.sql.impl.schema.Table in project hazelcast by hazelcast.

the class CreateDagVisitor method onSink.

public Vertex onSink(SinkPhysicalRel rel) {
    Table table = rel.getTable().unwrap(HazelcastTable.class).getTarget();
    collectObjectKeys(table);
    Vertex vertex = getJetSqlConnector(table).sinkProcessor(dag, table);
    connectInput(rel.getInput(), vertex, null);
    return vertex;
}
Also used : Vertex(com.hazelcast.jet.core.Vertex) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable) Table(com.hazelcast.sql.impl.schema.Table) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable)

Example 5 with Table

use of com.hazelcast.sql.impl.schema.Table in project hazelcast by hazelcast.

the class CreateDagVisitor method onInsert.

public Vertex onInsert(InsertPhysicalRel rel) {
    Table table = rel.getTable().unwrap(HazelcastTable.class).getTarget();
    collectObjectKeys(table);
    VertexWithInputConfig vertexWithConfig = getJetSqlConnector(table).insertProcessor(dag, table);
    Vertex vertex = vertexWithConfig.vertex();
    connectInput(rel.getInput(), vertex, vertexWithConfig.configureEdgeFn());
    return vertex;
}
Also used : Vertex(com.hazelcast.jet.core.Vertex) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable) Table(com.hazelcast.sql.impl.schema.Table) VertexWithInputConfig(com.hazelcast.jet.sql.impl.connector.SqlConnector.VertexWithInputConfig) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable)

Aggregations

Table (com.hazelcast.sql.impl.schema.Table)14 HazelcastTable (com.hazelcast.jet.sql.impl.schema.HazelcastTable)9 Vertex (com.hazelcast.jet.core.Vertex)7 SqlConnector (com.hazelcast.jet.sql.impl.connector.SqlConnector)5 Map (java.util.Map)4 NodeEngine (com.hazelcast.spi.impl.NodeEngine)3 QueryException (com.hazelcast.sql.impl.QueryException)3 PlanObjectKey (com.hazelcast.sql.impl.optimizer.PlanObjectKey)3 ConstantTableStatistics (com.hazelcast.sql.impl.schema.ConstantTableStatistics)3 MappingField (com.hazelcast.sql.impl.schema.MappingField)3 TableField (com.hazelcast.sql.impl.schema.TableField)3 List (java.util.List)3 Nonnull (javax.annotation.Nonnull)3 FunctionEx (com.hazelcast.function.FunctionEx)2 DAG (com.hazelcast.jet.core.DAG)2 EventTimePolicy (com.hazelcast.jet.core.EventTimePolicy)2 ProcessorMetaSupplier (com.hazelcast.jet.core.ProcessorMetaSupplier)2 SourceBuilder (com.hazelcast.jet.pipeline.SourceBuilder)2 ExpressionUtil (com.hazelcast.jet.sql.impl.ExpressionUtil)2 VertexWithInputConfig (com.hazelcast.jet.sql.impl.connector.SqlConnector.VertexWithInputConfig)2