private static boolean isSoftDeleteTxn(Configuration conf, ASTNode tree) {
    boolean locklessReadsEnabled = HiveConf.getBoolVar(conf, ConfVars.HIVE_ACID_LOCKLESS_READS_ENABLED);

    switch (tree.getToken().getType()) {
      case HiveParser.TOK_DROPDATABASE:
      case HiveParser.TOK_DROPTABLE:
      case HiveParser.TOK_DROP_MATERIALIZED_VIEW:
        return locklessReadsEnabled
          || HiveConf.getBoolVar(conf, ConfVars.HIVE_ACID_CREATE_TABLE_USE_SUFFIX);

      case HiveParser.TOK_ALTERTABLE: {
        boolean isDropParts = tree.getFirstChildWithType(HiveParser.TOK_ALTERTABLE_DROPPARTS) != null;
        if (isDropParts) {
          return locklessReadsEnabled
            || HiveConf.getBoolVar(conf, ConfVars.HIVE_ACID_DROP_PARTITION_USE_BASE);
        }
        boolean isRenamePart = tree.getFirstChildWithType(HiveParser.TOK_ALTERTABLE_RENAMEPART) != null;
        if (isRenamePart) {
          return locklessReadsEnabled
            || HiveConf.getBoolVar(conf, ConfVars.HIVE_ACID_RENAME_PARTITION_MAKE_COPY);
        }
      }
    }
    return false;
  }
Determines transaction type based on query AST.
@param tree AST
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java