[ https://issues.apache.org/jira/browse/HIVE-26847?focusedWorklogId=835169&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-835169 ]
ASF GitHub Bot logged work on HIVE-26847: ----------------------------------------- Author: ASF GitHub Bot Created on: 22/Dec/22 02:53 Start Date: 22/Dec/22 02:53 Worklog Time Spent: 10m Work Description: amansinha100 commented on code in PR #3856: URL: https://github.com/apache/hive/pull/3856#discussion_r1055039591 ########## standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java: ########## @@ -1127,6 +1127,8 @@ public enum ConfVars { "command should handle partition retention. If enabled, and if a specific partition's age exceeded\n" + "retention period the partition will be dropped along with data"), + MATERIALIZED_VIEW_ENABLED("metastore.materialized.view.enabled", "metastore.materialized.view.enabled", true, Review Comment: Agree that disabling the MV creation globally is somewhat drastic. MVs (and indexes in RDBMS) are entities which privileged users (e.g DBAs) should always be allowed to create. As previously mentioned, Create MV is almost the same as doing a CTAS which also makes a secondary copy of the data but we don't prevent people from doing CTAS. If we want to prevent read operations of MVs, one option is to set `hive.materializedview.rewriting` and `hive.materializedview.rewriting.sql` to false which will prevent the MVs to be used for query rewrites. The other suggestion about using Ranger to impose restrictions on who can do MV creation also seems reasonable and cleaner solution. @saihemanth-cloudera while currently there may not be a way to distinguish in Ranger, if one were to do this approach it would mean adding a new resource type for MVs in Ranger. Issue Time Tracking ------------------- Worklog Id: (was: 835169) Time Spent: 3.5h (was: 3h 20m) > Allow a config to disable creation of Materialized Views > -------------------------------------------------------- > > Key: HIVE-26847 > URL: https://issues.apache.org/jira/browse/HIVE-26847 > Project: Hive > Issue Type: Improvement > Reporter: Ayush Saxena > Assignee: Ayush Saxena > Priority: Major > Labels: pull-request-available > Time Spent: 3.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)