You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2014/09/01 00:36:20 UTC

[jira] [Commented] (PHOENIX-1098) Support CASCADE option on DROP TABLE that drops all VIEWs

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

James Taylor commented on PHOENIX-1098:
---------------------------------------

Looks fantastic, [~jfernando_sfdc]. Couple of minor items:
- For 3.0 patch, don't remove the old MetaDataProtocol method because then a 3.1 client won't work with a 3.2 server. Instead, just leave it and have it call your new method with isCascade=false:
{code}
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index a303b95..7bd2705 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -232,7 +232,7 @@ public void write(DataOutput output) throws IOException {
      * @return MetaDataMutationResult
      * @throws IOException
      */
-    MetaDataMutationResult dropTable(List<Mutation> tableMetadata, String tableType) throws IOException;
+    MetaDataMutationResult dropTable(List<Mutation> tableMetadata, String tableType, boolean isCascade) throws IOException;
{code}
- Make sure to re-base your local repo, as I checked in the fix for SuffixFilter and your patches are going to conflict with that change. 


> Support CASCADE option on DROP TABLE that drops all VIEWs
> ---------------------------------------------------------
>
>                 Key: PHOENIX-1098
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1098
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.1
>            Reporter: James Taylor
>            Assignee: Jan Fernando
>             Fix For: 4.1
>
>         Attachments: PHOENIX-1098-3.1.patch, PHOENIX-1098-4.1.patch, PHOENIX-1098-master.patch
>
>
> It's inconvenient to have to manually drop all of the views of a multi-tenant table before being able to drop the table. We should support a CASCADE option on DROP TABLE which automatically does this, like this:
> DROP TABLE foo CASCADE



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)