public void endAnalysis(ASTNode tree) {
    if (ctx != null){
      queryProperties.setUsedTables(
          CacheTableHelper.getUniqueNames(ctx.getParsedTables()));
    }
    setQueryType(tree); // at this point we know the query type for sure
  }
Called when we end analysis of a query.
ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java