Iterates over possible query plans by rearranging the query plan graph.
The given query plan is taken as an initial state. Every successive
call to next will modify the query plan into a unique
tree. Once all possible query plans are iterated, next
returns false.
Resets the query plan iterator with the given copy of the query
plan. The query iterator must assume that this given query plan
is in its initial state, and should iterate through different
query plans, modifying the given copy.
next
boolean next()
Modifies the query plan into a unique tree.
Returns:
If true, tne query plan is configured into a unique
tree. If false, query plan is now returned back to its original
state during iterator construction, and the iteration is
expected to stop.