private String getQueryStringForCache(ASTNode ast) {
    unparseTranslator.applyTranslations(ctx.getTokenRewriteStream(), RESULTS_CACHE_KEY_TOKEN_REWRITE_PROGRAM);
    return ctx.getTokenRewriteStream()
            .toString(RESULTS_CACHE_KEY_TOKEN_REWRITE_PROGRAM, ast.getTokenStartIndex(), ast.getTokenStopIndex());
  }
Generate the query string for this query (with fully resolved table references).
@return The query string with resolved references. NULL if an error occurred.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java