code: protected boolean pushTowardsOriginatingNode( PlanNode criteriaNode,
                                                    PlanNode originatingNode ) {
          // To keep things stable, 'originatingNode' should be the top-most SELECT (criteria) node above a SOURCE ...
          while (originatingNode.getParent().getType() == Type.SELECT) {
              originatingNode = originatingNode.getParent();
              if (originatingNode == criteriaNode) return false;
          }
  
          // Find out the best node above which the criteria node should be placed ...
          PlanNode bestChild = findBestChildForCriteria(criteriaNode, originatingNode);
          if (bestChild == criteriaNode) return false;
          criteriaNode.extractFromParent();
          bestChild.insertAsParent(criteriaNode);
          assert atBoundary(criteriaNode, originatingNode);
          return true;
      }
docs: Push the criteria node as close to the originating node as possible. In general, the criteria node usually ends up being
  moved to be a parent of the supplied originating node, except in a couple of cases:
  <ul>
  <li>There are already criteria nodes immediately above the originating node; in this case, the supplied criteria node is
  placed above all these existing criteria nodes.</li>
  <li>The originating node is below a JOIN node that is itself below an ACCESS node; in this case, the criteria node is
  placed immediately above the JOIN node.</li>
  <li>The originating node is below a LIMIT with a single SORT child node; in this case, the criteria node is placed
  immediately above the LIMIT node.</li>
  </ul>
  
  @param criteriaNode the criteria node that is to be pushed down; may not be null
  @param originatingNode the target node that represents the node above which the criteria node should be inserted; may not
  be null
  @return true if the criteria node was pushed down, or false if the criteria node could not be pushed down