You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/12/15 12:14:06 UTC

[GitHub] [hive] kasakrisz commented on a diff in pull request #3856: HIVE-26847: Allow a config to disable creation of Materialized Views.

kasakrisz commented on code in PR #3856:
URL: https://github.com/apache/hive/pull/3856#discussion_r1049566428


##########
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:
   > They always need to touch the file system when they have a query to make a log entry who touched what and when. 
   
   MV creation is technically a table creation with some extra metadata. The same API is called and each time a table/mv is created a new entry is inserted into the `NOTIFICATION_LOG` table:
   
   In this example `emp` is a table `mv1` is a materialized view.
   
   ```
   NL_ID|EVENT_ID|EVENT_TIME|EVENT_TYPE                |CAT_NAME|DB_NAME           |TBL_NAME                
     304|     303|1671096468|ALLOC_WRITE_ID_EVENT      |        |default           |emp                      
     305|     304|1671096468|ALTER_TABLE               |hive    |default           |emp                      
     306|     308|1671096472|CREATE_TABLE              |hive    |default           |mv1                      
   ```
   
   Could this be used for audit?



-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org