[ https://issues.apache.org/jira/browse/HIVE-22956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17049185#comment-17049185 ]
Miklos Gergely commented on HIVE-22956: --------------------------------------- [~jcamachorodriguez] I have 2 questions: # If I create table, then create a view on top of it, then a materialized view on top of the view, then drop the view, it is not causing any issues. I assume that is because we substitute the query defined by the view during the creation of the MV with the view, thus the original view is no longer needed for the MV. Because of these we should not check before view dropping if they are used by any MVs. Please confirm, that this is correct. # It occurred to me that in the error message we could display the MVs that are preventing the table from being dropped, though it may lead to security issues. Please let me know if you'd like to have something like "Cannot drop table since it is used by the following materialized view definitions: mv1, mv2". > Fix checking if a table is used by a materialized view before dropping > ---------------------------------------------------------------------- > > Key: HIVE-22956 > URL: https://issues.apache.org/jira/browse/HIVE-22956 > Project: Hive > Issue Type: Bug > Components: Hive > Reporter: Miklos Gergely > Assignee: Miklos Gergely > Priority: Major > Fix For: 4.0.0 > > > Currently when a table is dropped we are deriving if it was used by any > materialized views from the error message got from the Metastore. Instead of > this we should check it in advance, from the HiveMaterializedViewsRegistry. -- This message was sent by Atlassian Jira (v8.3.4#803005)