[
https://issues.apache.org/jira/browse/PHOENIX-3377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16532061#comment-16532061
]
Geoffrey Jacoby commented on PHOENIX-3377:
------------------------------------------
[~tdsilva] - Looks like the lack of support for DROP VIEW CASCADE from a global
view to one or more tenant views is a known issue.
I looked at ViewIndexIT, and altered the testUpdateOnTenantViewWithGlobalView()
to omit the manual drop of the tenant view on line 384, and to add a CASCADE to
the drop of the global view on line 386. The test fails because neither the
global view nor the tenant view are correctly dropped. In the logs I see this
comming from the DROP statement of the global view:
{code:java}
2018-07-03 16:13:25,010 WARN [main]
org.apache.phoenix.mapreduce.util.PhoenixConfigurationUtil(658): Unable to find
parent table "PLATFORM_ENTITY.V_T000002" of table "PLATFORM_ENTITY.I_T000003"
to determine USE_STATS_FOR_PARALLELIZATION
org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table
undefined. tableName=PLATFORM_ENTITY.V_T000002 at
org.apache.phoenix.schema.PMetaDataImpl.getTableRef(PMetaDataImpl.java:71) at
org.apache.phoenix.jdbc.PhoenixConnection.getTable(PhoenixConnection.java:575)
at
org.apache.phoenix.mapreduce.util.PhoenixConfigurationUtil.getStatsForParallelizationProp(PhoenixConfigurationUtil.java:647)at
org.apache.phoenix.iterate.BaseResultIterators.<init>(BaseResultIterators.java:500)
at
org.apache.phoenix.iterate.ParallelIterators.<init>(ParallelIterators.java:62)
at
org.apache.phoenix.iterate.ParallelIterators.<init>(ParallelIterators.java:69)
at org.apache.phoenix.execute.AggregatePlan.newIterator(AggregatePlan.java:273)
at org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:361) at
org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:216) at
org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:211) at
org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:206) at
org.apache.phoenix.compile.PostDDLCompiler$2.execute(PostDDLCompiler.java:288)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.updateData(ConnectionQueryServicesImpl.java:3520)
at
org.apache.phoenix.query.DelegateConnectionQueryServices.updateData(DelegateConnectionQueryServices.java:152)
at
org.apache.phoenix.schema.MetaDataClient.dropTable(MetaDataClient.java:2948) at
org.apache.phoenix.schema.MetaDataClient.dropTable(MetaDataClient.java:2806) at
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableDropTableStatement$1.execute(PhoenixStatement.java:1119)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:398)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:381)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:380)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:368)
at
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1794) at
org.apache.phoenix.end2end.index.ViewIndexIT.testUpdateOnTenantViewWithGlobalView(ViewIndexIT.java:384)
{code}
> Support DROP VIEW CASCADE
> -------------------------
>
> Key: PHOENIX-3377
> URL: https://issues.apache.org/jira/browse/PHOENIX-3377
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Priority: Major
>
> We currently do not produce an error for a DROP VIEW CASCADE command, but at
> the same time we don't cascade drop all child views. We should either produce
> an error message for this command or recursively drop all child views.
> See ViewIndexIT.testUpdateOnTenantViewWithGlobalView() for an example.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)