use of com.hazelcast.jet.core.Vertex in project hazelcast by hazelcast.
the class CreateDagVisitor method onAggregate.
public Vertex onAggregate(AggregatePhysicalRel rel) {
AggregateOperation<?, JetSqlRow> aggregateOperation = rel.aggrOp();
Vertex vertex = dag.newUniqueVertex("Aggregate", ProcessorMetaSupplier.forceTotalParallelismOne(ProcessorSupplier.of(Processors.aggregateP(aggregateOperation)), localMemberAddress));
connectInput(rel.getInput(), vertex, edge -> edge.distributeTo(localMemberAddress).allToOne(""));
return vertex;
}
use of com.hazelcast.jet.core.Vertex 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;
}
use of com.hazelcast.jet.core.Vertex 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;
}
use of com.hazelcast.jet.core.Vertex 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;
}
use of com.hazelcast.jet.core.Vertex 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;
}
Aggregations