palashc commented on code in PR #2196: URL: https://github.com/apache/phoenix/pull/2196#discussion_r2157382521
########## phoenix-core-client/src/main/java/org/apache/phoenix/util/CDCUtil.java: ########## @@ -99,6 +99,19 @@ public static boolean isCDCIndex(String indexName) { return indexName.startsWith(CDC_INDEX_PREFIX); } + public static boolean isCDCIndex(byte[] indexNameBytes) { + String indexName = Bytes.toString(indexNameBytes); + return indexName.startsWith(CDC_INDEX_PREFIX); Review Comment: done ########## phoenix-core-client/src/main/java/org/apache/phoenix/util/CDCUtil.java: ########## @@ -99,6 +99,19 @@ public static boolean isCDCIndex(String indexName) { return indexName.startsWith(CDC_INDEX_PREFIX); } + public static boolean isCDCIndex(byte[] indexNameBytes) { + String indexName = Bytes.toString(indexNameBytes); + return indexName.startsWith(CDC_INDEX_PREFIX); + } + + public static byte[] getCdcObjectName(byte[] cdcIndexName) { + byte[] result = new byte[cdcIndexName.length - CDC_INDEX_PREFIX.length()]; + for (int i = 0; i < cdcIndexName.length - CDC_INDEX_PREFIX.length(); i++) { + result[i] = cdcIndexName[i + CDC_INDEX_PREFIX.length()]; + } Review Comment: done -- 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: issues-unsubscr...@phoenix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org