code: private QueryResultImpl combineResults(Queue<QueryResultImpl> results, boolean distinct) {
          while (results.size() > 1) {
              QueryResultImpl a = results.remove();
              QueryResultImpl b = results.remove();
              results.add(combineResults(a, b, distinct));
          }
  
          return results.remove();
      }
docs: Combine the results of the individual components with the cartesian product.
  
  @return the combined result