You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/09/22 12:38:00 UTC

[jira] [Work logged] (HIVE-25546) Enable incremental rebuild of Materialized views with insert only source tables

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

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

                Author: ASF GitHub Bot
            Created on: 22/Sep/21 12:37
            Start Date: 22/Sep/21 12:37
    Worklog Time Spent: 10m 
      Work Description: kasakrisz opened a new pull request #2663:
URL: https://github.com/apache/hive/pull/2663


   ### What changes were proposed in this pull request?
   1. Add Calcite rule to turn on populating writeId in insert only TableScans.
   2. Apply the rule in case of incremental materialized view rebuild
   * when there were no delete operations since the last MV rebuild
   * or only partition based incremental rebuild can be applied.
   
   ### Why are the changes needed?
   Materialized views with insert only source tables can not be rebuilt incrementally.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=materialized_view_create_rewrite_8.q,materialized_view_create_rewrite_9.q,materialized_view_partitioned_create_rewrite_agg.q,materialized_view_partitioned_create_rewrite_agg_2.q,materialized_view_partitioned_create_rewrite_agg_3.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.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

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


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

            Worklog Id:     (was: 654055)
    Remaining Estimate: 0h
            Time Spent: 10m

> Enable incremental rebuild of Materialized views with insert only source tables
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-25546
>                 URL: https://issues.apache.org/jira/browse/HIVE-25546
>             Project: Hive
>          Issue Type: Improvement
>          Components: CBO, Materialized views
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code}
> create table t1(a int, b int, c int) stored as parquet TBLPROPERTIES ('transactional'='true', 'transactional_properties'='insert_only');
> create materialized view mat1 stored as orc TBLPROPERTIES ('transactional'='true') as
> select a, b, c from t1 where a > 10;
> {code}
> Currently materialized view *mat1* can not be rebuilt incrementally because it has an insert only source table (t1). Such tables does not have ROW_ID.write_id which is required to identify newly inserted records since the last rebuild.
> HIVE-25406 adds the ability to query write_id.



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