public static boolean isRawFormatFile(Path dataFile, FileSystem fs) throws IOException {
      try (Reader reader = OrcFile.createReader(dataFile, OrcFile.readerOptions(fs.getConf()))) {
        /*
          acid file would have schema like <op, owid, writerId, rowid, cwid, <f1, ... fn>> so could
          check it this way once/if OrcRecordUpdater.ACID_KEY_INDEX_NAME is removed
          TypeDescription schema = reader.getSchema();
          List<String> columns = schema.getFieldNames();
         */
        return OrcInputFormat.isOriginal(reader);
      } catch (FileFormatException | InvalidProtocolBufferException ex) {
        //We may be parsing a delta for Insert-only table which may not even be an ORC file so
        //cannot have ROW_IDs in it.
        LOG.debug("isRawFormat() called on " + dataFile + " which is not an ORC file: " +
            ex.getMessage());
        return true;
      } catch (FileNotFoundException ex) {
        //Fallback in case file was already removed and used Snapshot is outdated
        return false;
      }
    }
Checks if the files in base/delta dir are a result of Load Data/Add Partition statement
and thus do not have ROW_IDs embedded in the data.
This is only meaningful for full CRUD tables - Insert-only tables have all their data
in raw format by definition.
@param baseOrDeltaDir base or delta file.
@param dirSnapshot
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java