[jira] [Commented] (HIVE-24519) Optimize MV: Materialized views should not rebuild when tables are not modified
[ https://issues.apache.org/jira/browse/HIVE-24519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260206#comment-17260206 ] Krisztian Kasa commented on HIVE-24519: --- Pushed to master. Thanks [~jcamachorodriguez], [~mgergely] for review. > 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: 2.5h > 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)
[jira] [Commented] (HIVE-24519) Optimize MV: Materialized views should not rebuild when tables are not modified
[ https://issues.apache.org/jira/browse/HIVE-24519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17250318#comment-17250318 ] Jesus Camacho Rodriguez commented on HIVE-24519: {quote} In this test an MV is created with rewriting.time.window=5min. After that an insert executed on one of its source tables but the MV is considered to be up to date because of no timeout when rebuild is requested. Also the query rewritten to use the MV returns less record than the query with the original plan would return. {quote} [~kkasa], that should not be the behavior. For rebuild purposes, whether an MV is outdated or not should be determined using only the write id lists for the tables it uses. > 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: 0.5h > 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)
[jira] [Commented] (HIVE-24519) Optimize MV: Materialized views should not rebuild when tables are not modified
[ https://issues.apache.org/jira/browse/HIVE-24519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17250317#comment-17250317 ] Krisztian Kasa commented on HIVE-24519: --- [~rajesh.balamohan] Should we add a force option? Like {code:java} ALTER MATERIALIZED VIEW cmv_mat_view_n3 REBUILD ENFORCED or ALTER MATERIALIZED VIEW cmv_mat_view_n3 REBUILD FORCE {code} If for some reason the system cannot determine the condition of the materialized view well the user has no option to trigger the rebuild. Only drop and re-create the view works. Example: materialized_view_create_rewrite_time_window.q In this test an MV is created with rewriting.time.window=5min. After that an insert executed on one of its source tables but the MV is considered to be up to date because of no timeout when rebuild is requested. Also the query rewritten to use the MV returns less record than the query with the original plan would return. > 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: 0.5h > 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)