private List<Partition> getTablePartitions(IHMSHandler hmsHandler, Table table) throws MetaException {
    try {
      RawStore rawStore = hmsHandler.getMS();
      String catName = getTableCatalog(table);
      List<Partition> partitions = rawStore.getPartitions(catName, table.getDbName(), table.getTableName(), -1);
      return partitions;
    } catch (Exception err) {
      String msg = "Error getting partitions for " + Warehouse.getQualifiedName(table);
      LOG.error(msg, err);
      MetaException e1 = new MetaException(msg);
      e1.initCause(err);
      throw e1;
    }
  }
It's assumed everywhere that original data files are named according to
{@link #ORIGINAL_PATTERN} or{@link #ORIGINAL_PATTERN_COPY}
This checks that when transaction=true is set and throws if it finds any files that don't
follow convention.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java