@Override
  public boolean next() {

    currentLogical += currentDuplicateCount;
    if (currentLogical >= currentBatchSize) {
      return false;
    }

    Preconditions.checkState(seriesPosition + 1 < seriesCount);

    seriesPosition++;
    currentDuplicateCount = duplicateCounts[seriesPosition];
    currentIsAllNull = seriesIsAllNull[seriesPosition];

    if (!currentIsAllNull) {
      Preconditions.checkState(nonNullKeyPosition + 1 < nonNullKeyCount);
      nonNullKeyPosition++;
      currentHashCode = hashCodes[nonNullKeyPosition];
      setNextNonNullKey(nonNullKeyPosition);
    }
    Preconditions.checkState(currentDuplicateCount > 0);
    return true;
  }
Implementation of when a one key series or a serialized key series is being presented.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/keyseries/VectorKeySeriesSingleImpl.java