private void consumeRemaining() {
   if (prevRowMergingIterator == null) {
     return;
   }
   while (prevRowMergingIterator.hasNext()) {
     boolean wantMore = downstream.setNextRow(prevRowMergingIterator.next());
     if (!wantMore) {
       break;
     }
   }
 }
 private RowMergingIterator getMergingIterator(List<Iterator<Row>> bucketIts) {
   RowMergingIterator mergingIterator;
   if (prevRowMergingIterator != null) {
     mergingIterator = prevRowMergingIterator.merge(bucketIts);
   } else {
     mergingIterator = new RowMergingIterator(bucketIts, ordering);
   }
   return mergingIterator;
 }