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


   ### What changes were proposed in this pull request?
   When checking a Materialized view validity check whether any of the source 
tables compacted since the last materialized view rebuild.
   
   ### Why are the changes needed?
   During Materialized view rebuild we choose from incremental or full rebuild. 
   To make this choice existing implementation searches for delete transactions 
affect the source tables of the MV in `COMPLETED_TXN_COMPONENTS` table 
(Metastore) since the last rebuild. However these records are deleted during 
compaction. This leads to corrupted materialized view datasets since 
incremental rebuild will be used which does not handle deleted records.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. Query the materialized view and queries which plan is rewritten to scan 
the materialized view may produce different results.
   Only transactional materialized views are affected.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest.output.overwrite -DskipSparkTests 
-Dtest=TestMiniLlapLocalCliDriver -Dqfile=materialized_view_create_rewrite_4.q 
-pl itests/qtest -Pitests
   mvn test -Dtest=TestMaterializedViewRebuild -pl itests/hive-unit -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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to