kasakrisz opened a new pull request #1874:
URL: https://github.com/apache/hive/pull/1874


   ### What changes were proposed in this pull request?
   Query results cache requires query text having fully qualified table names 
as cache key. By the time query compilation reach the point where results cache 
key is generated unparseTranslator instance has the fully qualified table 
names. Use this to generate cache key.
   Generating the key from query text also requires the TokenRewriteStream 
instance related to the parsed query. Applying transformations stored in the 
unparseTranslator would alter the TokenRewriteStream and makes invalid for 
further usage. In order to avoid this a dedicated TokenRewriteStream program is 
introduced for Query results cache.
   
   ### Why are the changes needed?
   All query was parsed twice:
   * first parse to have the AST tree for compilation
   * second parse to generate cache key from query text having fully qualified 
table names.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Run existing qtest about Results cache:
   ```
   mvn test -Dtest.output.overwrite -DskipSparkTests 
-Dtest=TestMiniLlapLocalCliDriver 
-Dqfile=results_cache_invalidation2.q,results_cache_with_masking.q,results_cache_lifetime.q,results_cache_temptable.q,results_cache_with_auth.q,results_cache_3.q,results_cache_1.q,results_cache_empty_result.q,results_cache_capacity.q,results_cache_diff_fs.q,results_cache_2.q,results_cache_truncate.q,results_cache_quoted_identifiers.q,results_cache_transactional.q,results_cache_invalidation.q
 -pl itests/qtest -Pitests
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to