Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize logical nodes visit methods. (#166)
This commit provides memory optimization when visiting `LogicalNode`'s children. Old implementation was invoking `LogicalNode#getChildren` which makes shallow copy of its children nodes to only iterate over it we can use the fact that `LogicalNode` is in fact `java.lang.Iterable` and use enhanced for loop to iterate over it. Using it that way is more memory efficient and does not involve shallow copying because iterator returned by `LogicalNode` is unmodifiable.