@Override public boolean nextKeyValue() throws IOException {
    if (compactedValues.hasNext()) {
      return true;
    }
    if (getQueryResultsIterator().hasNext()) {
      ScanResultValue current = getQueryResultsIterator().next();
      //noinspection unchecked
      compactedValues = ((List<List<Object>>) current.getEvents()).iterator();
      return nextKeyValue();
    }
    return false;
  }
Record reader for results for Druid ScanQuery.
druid-handler/src/java/org/apache/hadoop/hive/druid/serde/DruidScanQueryRecordReader.java