[ https://issues.apache.org/jira/browse/PHOENIX-7054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17776305#comment-17776305 ]
ASF GitHub Bot commented on PHOENIX-7054: ----------------------------------------- haridsv commented on code in PR #1713: URL: https://github.com/apache/phoenix/pull/1713#discussion_r1362526481 ########## phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java: ########## @@ -3545,6 +3545,18 @@ public MutationState dropIndex(DropIndexStatement statement) throws SQLException return dropTable(schemaName, tableName, parentTableName, PTableType.INDEX, statement.ifExists(), false, false); } + public MutationState dropCDC(DropCDCStatement statement) throws SQLException { + String schemaName = statement.getTableName().getSchemaName(); + String cdcTableName = statement.getCdcObjName().getName(); + String parentTableName = statement.getTableName().getTableName(); + // Dropping the virtual CDC Table + dropTable(schemaName, cdcTableName, parentTableName, PTableType.CDC, statement.ifExists(), false, false); + + String indexName = CDCUtil.getCDCIndexName(statement.getCdcObjName().getName()); + // Dropping the uncovered index associated with the CDC Table + return dropTable(schemaName, indexName, parentTableName, PTableType.INDEX, statement.ifExists(), false, false); Review Comment: In create, we are catching SQLExceptions on index creation and translating them on to CDC so that user wouldn't be exposed to the index name that is internal to the CDC implementation. We should probably do something similar here. > CDC DDL Compiler support for ALTER and DROP > ------------------------------------------- > > Key: PHOENIX-7054 > URL: https://issues.apache.org/jira/browse/PHOENIX-7054 > Project: Phoenix > Issue Type: Sub-task > Reporter: Viraj Jasani > Assignee: Saurabh Rai > Priority: Major > > This supplements PHOENIX-7008. The purpose of this Jira is to support ALTER > and DROP CDC queries. -- This message was sent by Atlassian Jira (v8.20.10#820010)