use of org.apache.flink.table.planner.plan.nodes.exec.batch.BatchExecPythonCorrelate in project flink by apache.
the class ForwardHashExchangeProcessor method addExchangeAndReconnectEdge.
// TODO This implementation should be updated once FLINK-21224 is finished.
private ExecEdge addExchangeAndReconnectEdge(ExecEdge edge, InputProperty inputProperty, boolean strict) {
ExecNode<?> target = edge.getTarget();
ExecNode<?> source = edge.getSource();
if (source instanceof CommonExecExchange) {
return edge;
}
// only Calc, Correlate and Sort can propagate sort property and distribution property
if (source instanceof BatchExecCalc || source instanceof BatchExecPythonCalc || source instanceof BatchExecSort || source instanceof BatchExecCorrelate || source instanceof BatchExecPythonCorrelate) {
ExecEdge newEdge = addExchangeAndReconnectEdge(source.getInputEdges().get(0), inputProperty, strict);
source.setInputEdges(Collections.singletonList(newEdge));
}
BatchExecExchange exchange = createExchangeWithKeepInputAsIsDistribution(inputProperty, strict, (RowType) edge.getOutputType());
ExecEdge newEdge = new ExecEdge(source, exchange, edge.getShuffle(), edge.getExchangeMode());
exchange.setInputEdges(Collections.singletonList(newEdge));
return new ExecEdge(exchange, target, edge.getShuffle(), edge.getExchangeMode());
}
Aggregations