xiong duan created CALCITE-7030:
-----------------------------------

             Summary: Enhance TopologicalOrderIterator to support BOTTOM_UP
                 Key: CALCITE-7030
                 URL: https://issues.apache.org/jira/browse/CALCITE-7030
             Project: Calcite
          Issue Type: Bug
            Reporter: xiong duan


 

Currently , if the BOTTOM_UP approach is adopted, it achieved by reversing the 
results of TOP_DOWN.
{code:java}
case BOTTOM_UP:
         // TODO jvs 4-Apr-2006:  enhance TopologicalOrderIterator
      // to support reverse walk.
      final List<HepRelVertex> list = new ArrayList<>();
      for (HepRelVertex vertex : TopologicalOrderIterator.of(graph)) {
        list.add(vertex);
      }
      Collections.reverse(list);
      return list.iterator(); {code}
In this PR, TopologicalOrderIterator  will support BOTTOM_UP  and TOP_DOWN mode 
both.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to