lvyanquan commented on code in PR #4014:
URL: https://github.com/apache/flink-cdc/pull/4014#discussion_r2104141894


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/org/apache/flink/cdc/connectors/sqlserver/source/utils/SqlServerUtils.java:
##########
@@ -361,12 +361,16 @@ private static String quoteSchemaAndTable(TableId 
tableId) {
         return quoted.toString();
     }
 
-    public static String quote(String dbOrTableName) {
-        return "[" + dbOrTableName + "]";
+    /**
+     * @link <a
+     *     
href="https://learn.microsoft.com/en-us/sql/t-sql/functions/quotename-transact-sql";>QUOTENAME</a>
+     */
+    public static String quote(String name) {
+        return "[" + name.replace("]", "]]") + "]";

Review Comment:
   > To use incremental snapshot, 'scan.incremental.snapshot.chunk.key-column' 
must be set when the table doesn't have primary keys
   
   Does this error mean that we cannot handle such table names through FlinkCDC 
in actual environments too(not just e2e test)?
   
   I tend to revert this change first, although I believe your change is 
correct. We should verify and fix this issue in another 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]

Reply via email to