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.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]