use of org.apache.calcite.rel.BiRel in project samza by apache.
the class SamzaSqlApplicationConfig method populateSystemStreams.
private static void populateSystemStreams(RelNode relNode, List<String> inputSystemStreams, List<String> outputSystemStreams) {
if (relNode instanceof TableModify) {
outputSystemStreams.add(getSystemStreamName(relNode));
} else {
if (relNode instanceof BiRel) {
BiRel biRelNode = (BiRel) relNode;
populateSystemStreams(biRelNode.getLeft(), inputSystemStreams, outputSystemStreams);
populateSystemStreams(biRelNode.getRight(), inputSystemStreams, outputSystemStreams);
} else {
if (relNode.getTable() != null) {
inputSystemStreams.add(getSystemStreamName(relNode));
}
}
}
List<RelNode> relNodes = relNode.getInputs();
if (relNodes == null || relNodes.isEmpty()) {
return;
}
relNodes.forEach(node -> populateSystemStreams(node, inputSystemStreams, outputSystemStreams));
}
Aggregations