Github user twdsilva commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/359#discussion_r223910162
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
---
@@ -2655,10 +2666,19 @@ private MetaDataMutationResult doDropTable(byte[]
key, byte[] tenantId, byte[] s
boolean hasChildViews =
ViewFinder.hasChildViews(hTable, tenantId,
schemaName, tableName,
clientTimeStamp);
- if (hasChildViews && !isCascade) {
- // DROP without CASCADE on tables with child views
is not permitted
- return new
MetaDataMutationResult(MutationCode.UNALLOWED_TABLE_MUTATION,
-
EnvironmentEdgeManager.currentTimeMillis(), null);
+ if (hasChildViews) {
+ if (!isCascade) {
+ // DROP without CASCADE on tables with child
views is not permitted
--- End diff --
Drop without specifying CASCADE will fail if the table has child views, so
that the user knows that child views exist on the table. If the user wants to
drop a table and child views they can just used DROP CASCADE.
---