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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]