private static boolean isLockableTable(Table t, boolean isExternalEnabled, boolean isLocklessReads) {
    if (t.isTemporary()) {
      return false;
    }
    switch (t.getTableType()) {
      case MANAGED_TABLE:
      case MATERIALIZED_VIEW:
        return !(isLocklessReads && isTransactionalTable(t));
      case EXTERNAL_TABLE:
        return isExternalEnabled;
      default:
        return false;
    }
  }
Full recursive PathFilter version of IdPathFilter (filtering files for a given writeId and stmtId).
This can be used by recursive filelisting, when we want to match the delta / base pattern on the bucketFiles.
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java