public static TaskCompiler getCompiler(HiveConf conf, ParseContext parseContext) {
    if (HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")) {
      return new TezCompiler();
    } else {
      return new MapReduceCompiler();
    }
  }
Returns the appropriate compiler to translate the operator tree
into executable units.
ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompilerFactory.java