private static boolean needsLock(Entity entity, boolean isExternalEnabled) {
    return needsLock(entity, isExternalEnabled, 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