[ 
https://issues.apache.org/jira/browse/HIVE-18991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408955#comment-16408955
 ] 

Jesus Camacho Rodriguez commented on HIVE-18991:
------------------------------------------------

[~alangates], could you take a look at the patch? While adding tests, I 
realized that the code that I had added was not being hit because the tables 
were dropped individually from the client side. I have removed that code in 
{{HiveMetaStoreClient}} because AFAIK it does not make sense to make multiple 
roundtrips to metastore and it is rather better to do all the work once the 
request reaches the metastore server, but maybe I am missing something? Thanks

> Drop database cascade doesn't work with materialized views
> ----------------------------------------------------------
>
>                 Key: HIVE-18991
>                 URL: https://issues.apache.org/jira/browse/HIVE-18991
>             Project: Hive
>          Issue Type: Bug
>          Components: Materialized views, Metastore
>    Affects Versions: 3.0.0
>            Reporter: Alan Gates
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>         Attachments: HIVE-18991.patch
>
>
> Create a database, add a table and then a materialized view that depends on 
> the table.  Then drop the database with cascade set.  Sometimes this will 
> fail because when HiveMetaStore.drop_database_core goes to drop all of the 
> tables it may drop the base table before the materialized view, which will 
> cause an integrity constraint violation in the RDBMS.  To resolve this that 
> method should change to fetch and drop materialized views before tables.
> cc [~jcamachorodriguez]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to