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));
  }
Class representing the Samza SQL application config
samza-sql/src/main/java/org/apache/samza/sql/runner/SamzaSqlApplicationConfig.java