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

ASF GitHub Bot commented on PHOENIX-7074:
-----------------------------------------

haridsv commented on code in PR #1713:
URL: https://github.com/apache/phoenix/pull/1713#discussion_r1371766409


##########
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java:
##########
@@ -3554,7 +3555,12 @@ public MutationState dropCDC(DropCDCStatement statement) 
throws SQLException {
 
         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);
+        try {
+            return dropTable(schemaName, indexName, parentTableName, 
PTableType.INDEX, statement.ifExists(), false, false);
+        } catch (SQLException e) {
+            throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.fromErrorCode(e.getErrorCode()))
+                    
.setTableName(statement.getCdcObjName().getName()).build().buildException();

Review Comment:
   Missing `setRootCause()`. The same applies to create CDC as well, which I 
will fix in the next PR.





> Drop CDC implementation
> -----------------------
>
>                 Key: PHOENIX-7074
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7074
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Viraj Jasani
>            Assignee: Saurabh Rai
>            Priority: Major
>
> The implementation of the drop CDC on the CDC object should clean up CDC 
> object entry and also uncovered index created on the data table.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to