Search in sources :

Example 1 with StreamExecMultipleInput

use of org.apache.flink.table.planner.plan.nodes.exec.stream.StreamExecMultipleInput in project flink by apache.

the class MultipleInputNodeCreationProcessor method createStreamMultipleInputNode.

private StreamExecMultipleInput createStreamMultipleInputNode(MultipleInputGroup group, List<Tuple3<ExecNode<?>, InputProperty, ExecEdge>> inputs) {
    ExecNode<?> rootNode = group.root.execNode;
    List<ExecNode<?>> inputNodes = new ArrayList<>();
    for (Tuple3<ExecNode<?>, InputProperty, ExecEdge> tuple3 : inputs) {
        inputNodes.add(tuple3.f0);
    }
    String description = ExecNodeUtil.getMultipleInputDescription(rootNode, inputNodes, new ArrayList<>());
    StreamExecMultipleInput multipleInput = new StreamExecMultipleInput(inputNodes.stream().map(i -> InputProperty.DEFAULT).collect(Collectors.toList()), rootNode, description);
    List<ExecEdge> inputEdges = new ArrayList<>(inputNodes.size());
    for (ExecNode<?> inputNode : inputNodes) {
        inputEdges.add(ExecEdge.builder().source(inputNode).target(multipleInput).build());
    }
    multipleInput.setInputEdges(inputEdges);
    return multipleInput;
}
Also used : InputProperty(org.apache.flink.table.planner.plan.nodes.exec.InputProperty) ExecEdge(org.apache.flink.table.planner.plan.nodes.exec.ExecEdge) ArrayList(java.util.ArrayList) StreamExecMultipleInput(org.apache.flink.table.planner.plan.nodes.exec.stream.StreamExecMultipleInput) ExecNode(org.apache.flink.table.planner.plan.nodes.exec.ExecNode)

Aggregations

ArrayList (java.util.ArrayList)1 ExecEdge (org.apache.flink.table.planner.plan.nodes.exec.ExecEdge)1 ExecNode (org.apache.flink.table.planner.plan.nodes.exec.ExecNode)1 InputProperty (org.apache.flink.table.planner.plan.nodes.exec.InputProperty)1 StreamExecMultipleInput (org.apache.flink.table.planner.plan.nodes.exec.stream.StreamExecMultipleInput)1