private static void getChildState(AcidDirectory directory, HdfsFileStatusWithId childWithId, ValidWriteIdList writeIdList,
      ValidTxnList validTxnList, boolean ignoreEmptyFiles) throws IOException {
    Path childPath = childWithId.getFileStatus().getPath();
    String fn = childPath.getName();
    if (!childWithId.getFileStatus().isDirectory()) {
      if (!ignoreEmptyFiles || childWithId.getFileStatus().getLen() != 0) {
        directory.getOriginalFiles().add(childWithId);
      }
    } else if (fn.startsWith(BASE_PREFIX)) {
      processBaseDir(childPath, writeIdList, validTxnList, directory, null);
    } else if (fn.startsWith(DELTA_PREFIX) || fn.startsWith(DELETE_DELTA_PREFIX)) {
      processDeltaDir(childPath, writeIdList, validTxnList, directory, null);
    } else {
      // This is just the directory.  We need to recurse and find the actual files.  But don't
      // do this until we have determined there is no base.  This saves time.  Plus,
      // it is possible that the cleaner is running and removing these original files,
      // in which case recursing through them could cause us to get an error.
      directory.getOriginalDirectories().add(childPath);
    }
  }
Returns {@code true} if {@code parsedBase} was created by compaction.
As of Hive 4.0 we can tell if a directory is a result of compaction based on the
presence of {@link AcidUtils#VISIBILITY_PATTERN} suffix.  Base directories written prior to
that, have to rely on the {@link MetaDataFile} in the directory. So look at the filename first
since that is the cheaper test.
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java