public boolean checkCompatibility(final List<Reader> readers) {
    if (readers == null || readers.isEmpty()) {
      return false;
    }

    if (!readers.stream().allMatch(
      r -> readers.get(0).getSchema().equals(r.getSchema()) && readers.get(0).getCompression()
              .equals(r.getCompression()) && readers.get(0).getCompressionSize() == r.getCompressionSize() && readers
              .get(0).getFileVersion().equals(r.getFileVersion()) && readers.get(0).getWriterVersion()
              .equals(r.getWriterVersion()) && readers.get(0).getRowIndexStride() == r.getRowIndexStride())) {
      LOG.warn("Incompatible ORC file merge!");
      return false;
    }
    return true;
  }
Check compatibility between readers.
@param readers list of readers
@return true, if the readers are compatible
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/OrcFileMerger.java