code: private IntermediateQuery pushDownExpressions(final IntermediateQuery initialQuery) {
          // Non-final
          Optional<QueryNode> optionalCurrentNode = initialQuery.getFirstChild(initialQuery.getRootNode());
  
          // Non-final
          IntermediateQuery currentQuery = initialQuery;
  
          while (optionalCurrentNode.isPresent()) {
              final QueryNode currentNode = optionalCurrentNode.get();
  
              /*
               * InnerJoinNode, LeftJoinNode, FilterNode or some extensions
               */
              if (currentNode instanceof JoinOrFilterNode) {
                  NextNodeAndQuery nextNodeAndQuery = optimizeJoinOrFilter(currentQuery, (JoinOrFilterNode) currentNode);
                  optionalCurrentNode = nextNodeAndQuery.getOptionalNextNode();
                  currentQuery = nextNodeAndQuery.getNextQuery();
              } else {
                  optionalCurrentNode = getDepthFirstNextNode(currentQuery, currentNode);
              }
          }
          return currentQuery;
      }
docs: Tries to optimize all the JoinOrFilterNodes, ONE BY ONE.
  Navigates in a top-down fashion.