@Override
    public void next(OrcStruct next) throws IOException {
      while(true) {
        if(nextFromCurrentFile(next)) {
          return;
        } else {
          if (originalFiles.size() <= nextFileIndex) {
            //no more original files to read
            nextRecord = null;
            recordReader.close();
            return;
          } else {
            rowIdOffset += reader.getNumberOfRows();
            recordReader.close();
            reader = advanceToNextFile();
            if(reader == null) {
              nextRecord = null;
              return;
            }
            recordReader = reader.rowsOptions(options, conf);
          }
        }
      }
    }
Note that for reading base_x/ or delta_x_x/ with non-acid schema,
{@link Options#getRootPath()} is set to base_x/ or delta_x_x/ which causes all it's
contents to be in {@link AcidDirectory#getOriginalFiles()}
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java