private void executeSequentially(Collection<Collection> resultCollector, List buckets)
      throws QueryException, InterruptedException, ForceReattemptException {
    ExecutionContext context =
        new QueryExecutionContext(parameters, pr.getCache(), query);

    CompiledSelect cs = query.getSimpleSelect();
    int limit = query.getLimit(parameters);
    if (cs != null && cs.isOrderBy()) {
      for (Integer bucketID : _bucketsToQuery) {
        List<Integer> singleBucket = Collections.singletonList(bucketID);
        context.setBucketList(singleBucket);
        executeQueryOnBuckets(resultCollector, context);
      }
      Collection mergedResults = coalesceOrderedResults(resultCollector, context, cs, limit);
      resultCollector.clear();
      resultCollector.add(mergedResults);

    } else {
      context.setBucketList(buckets);
      executeQueryOnBuckets(resultCollector, context);
    }
  }
Executes a pre-compiled query on a data store. Adds result objects to resultQueue

@return boolean true if the result is a struct type
@throws ForceReattemptException if query should be tried again
geode-core/src/main/java/org/apache/geode/internal/cache/PRQueryProcessor.java