code: public List<JoinNode> generateLeafNodesJoinOrder() {
          ArrayList<JoinNode> leafNodes = new ArrayList<>();
          listNodesJoinOrderRecursive(leafNodes, false);
          return leafNodes;
      }
docs: Returns tables in the order they are joined in the tree by iterating the tree depth-first