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

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

                Author: ASF GitHub Bot
            Created on: 03/Apr/23 11:45
            Start Date: 03/Apr/23 11:45
    Worklog Time Spent: 10m 
      Work Description: kasakrisz commented on code in PR #4166:
URL: https://github.com/apache/hive/pull/4166#discussion_r1155851179


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/materialized/alter/rebuild/AlterMaterializedViewRebuildAnalyzer.java:
##########
@@ -299,7 +300,8 @@ private RelNode applyRecordIncrementalRebuildPlan(
       // First we need to check if it is valid to convert to MERGE/INSERT INTO.
       // If we succeed, we modify the plan and afterwards the AST.
       // MV should be an acid table.
-      boolean fullAcidView = AcidUtils.isFullAcidTable(mvTable.getTTable());
+      boolean fullAcidView = AcidUtils.isFullAcidTable(mvTable.getTTable())

Review Comment:
   renamed to `acidView`



##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/materialized/alter/rebuild/AlterMaterializedViewRebuildAnalyzer.java:
##########
@@ -465,21 +467,37 @@ private RelNode applyIncrementalRebuild(RelNode basePlan, 
RelMetadataProvider md
   protected ASTNode fixUpAfterCbo(ASTNode originalAst, ASTNode newAst, 
CalcitePlanner.PreCboCtx cboCtx)
           throws SemanticException {
     ASTNode fixedAST = super.fixUpAfterCbo(originalAst, newAst, cboCtx);
+    if (mvRebuildMode == MaterializationRebuildMode.INSERT_OVERWRITE_REBUILD) {

Review Comment:
   refactored





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

    Worklog Id:     (was: 854522)
    Time Spent: 1h 50m  (was: 1h 40m)

> Incremental rebuild of materialized view having aggregate and stored by 
> iceberg
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-27187
>                 URL: https://issues.apache.org/jira/browse/HIVE-27187
>             Project: Hive
>          Issue Type: Improvement
>          Components: Iceberg integration, Materialized views
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Currently incremental rebuild of materialized view stored by iceberg which 
> definition query contains aggregate operator is transformed to an insert 
> overwrite statement which contains a union operator if the source tables 
> contains insert operations only. One branch of the union scans the view the 
> other produces the delta.
> This can be improved further: transform the statement to a multi insert 
> statement representing a merge statement to insert new aggregations and 
> update existing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to