[ https://issues.apache.org/jira/browse/HIVE-24434?focusedWorklogId=524367&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-524367 ]
ASF GitHub Bot logged work on HIVE-24434: ----------------------------------------- Author: ASF GitHub Bot Created on: 15/Dec/20 10:58 Start Date: 15/Dec/20 10:58 Worklog Time Spent: 10m Work Description: kasakrisz opened a new pull request #1782: URL: https://github.com/apache/hive/pull/1782 ### What changes were proposed in this pull request? 1. Store the scope of each materialized view in the cache/registry. It specifies whether the MV can be used in both Calcite and Sql text based query rewrites or Sql text based only. 2. Scope value is calculated when the MV definition is parsed during adding the MV to the Registry. ### Why are the changes needed? Number of Materialized views added to the Calcite based rewrite planner affects query compilation performance. Too much view definition increases the planning time without any benefit. There are plan patterns which are not supported by the planner. MV having such patterns in its definition can be filtered out before even added to the planner. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? ``` mvn test -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=materialized_view_rewrite_11.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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 524367) Remaining Estimate: 0h Time Spent: 10m > Filter out materialized views for rewriting if plan pattern is not allowed > -------------------------------------------------------------------------- > > Key: HIVE-24434 > URL: https://issues.apache.org/jira/browse/HIVE-24434 > Project: Hive > Issue Type: Improvement > Components: Materialized views > Affects Versions: 4.0.0 > Reporter: Krisztian Kasa > Assignee: Krisztian Kasa > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > Some materialized views are not enabled for Calcite based rewriting. Rules > for validating materialized views are implemented by HIVE-20748. > Since text based materialized view query rewrite doesn't have such > limitations some logic must be implemented to flag materialized view whether > they are enabled to text based rewrite only or both. -- This message was sent by Atlassian Jira (v8.3.4#803005)