private static Path[] getDirectInsertDirectoryCandidatesGlobStatus(FileSystem fs, Path path, int skipLevels,
      PathFilter filter, long writeId, int stmtId, boolean isBaseDir, AcidUtils.Operation acidOperation) throws IOException {
    StringBuilder sb = new StringBuilder(path.toUri().getPath());
    for (int i = 0; i < skipLevels; i++) {
      sb.append(Path.SEPARATOR).append('*');
    }
    if (stmtId < 0) {
      // Note: this does not work.
      // sb.append(Path.SEPARATOR).append(AcidUtils.deltaSubdir(writeId, writeId)).append("_*");
      throw new AssertionError("GlobStatus should not be called without a statement ID");
    } else {
      String deltaSubDir = AcidUtils.baseOrDeltaSubdir(isBaseDir, writeId, writeId, stmtId);
      if (AcidUtils.Operation.DELETE.equals(acidOperation)) {
        deltaSubDir = AcidUtils.deleteDeltaSubdir(writeId, writeId, stmtId);
      }
      if (AcidUtils.Operation.UPDATE.equals(acidOperation)) {
        String deltaPostFix = deltaSubDir.replace("delta", "");
        deltaSubDir = "{delete_delta,delta}" + deltaPostFix;
      }
      sb.append(Path.SEPARATOR).append(deltaSubDir);
    }
    Path pathPattern = new Path(path, sb.toString());
    return statusToPath(fs.globStatus(pathPattern, filter));
  }
Create row key and value object inspectors for reduce vectorization.
The row object inspector used by ReduceWork needs to be a **standard**
struct object inspector, not just any struct object inspector.
@param keyInspector
@param valueInspector
@return OI
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java