[ 
https://issues.apache.org/jira/browse/HIVE-24519?focusedWorklogId=523925&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-523925
 ]

ASF GitHub Bot logged work on HIVE-24519:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Dec/20 15:17
            Start Date: 14/Dec/20 15:17
    Worklog Time Spent: 10m 
      Work Description: miklosgergely commented on a change in pull request 
#1772:
URL: https://github.com/apache/hive/pull/1772#discussion_r542464850



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/materialized/alter/rebuild/AlterMaterializedViewRebuildAnalyzer.java
##########
@@ -69,6 +72,23 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
 
     LOG.debug("Rebuilding materialized view " + 
tableName.getNotEmptyDbTable());
     super.analyzeInternal(rewrittenAST);
+
+    try {
+      Table table = db.getTable(tableName.getDb(), tableName.getTable());

Review comment:
       Is there any reason not to do this check right after tableName is parsed 
from the tree? Probably I'm missing something, but I believe that right after  
line 62 this could be checked - no need to create the rootTasks then clear 
them. Also it would be nice to move this logic into a separate function, 
returning. boolean if it is outdated or not.




----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 523925)
    Time Spent: 20m  (was: 10m)

> Optimize MV: Materialized views should not rebuild when tables are not 
> modified
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-24519
>                 URL: https://issues.apache.org/jira/browse/HIVE-24519
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Materialized views
>            Reporter: Rajesh Balamohan
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> e.g
> {noformat}
> create materialized view c_c_address as 
> select c_customer_sk from customer c, customer_address ca where 
> c_current_addr_sk = ca.ca_address_id;
> ALTER MATERIALIZED VIEW c_c_address REBUILD; <-- This shouldn't trigger 
> rebuild, when source tables are not modified
>  {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to