public List<Task<?>> analyzeAST(ASTNode ast) throws Exception {

    // Do semantic analysis and plan generation
    Context ctx = new Context(conf);
    while ((ast.getToken() == null) && (ast.getChildCount() > 0)) {
      ast = (ASTNode) ast.getChild(0);
    }
    sem.getOutputs().clear();
    sem.getInputs().clear();
    sem.analyze(ast, ctx);
    ctx.clear();
    return sem.getRootTasks();
  }
Given the current configurations (e.g., hadoop version and execution mode), return
the correct file name to compare with the current test run output.

@param outDir   The directory where the reference log files are stored.
@param testName The test file name (terminated by ".out").
@return The file name appended with the configuration values if it exists.
itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java