JNSimba commented on code in PR #355:
URL: 
https://github.com/apache/doris-flink-connector/pull/355#discussion_r1542382853


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/oracle/OracleDatabaseSync.java:
##########
@@ -120,18 +118,21 @@ public List<SourceSchema> getSchemaList() throws 
Exception {
                     if (!isSyncNeeded(tableName)) {
                         continue;
                     }
-                    // Oracle allows table names to contain special characters 
such as /, #, $,
-                    // etc., as in 'A/B'.
-                    // However, Doris does not support tables with these 
characters.
-                    if (!tableName.matches(TableSchema.DORIS_TABLE_REGEX)) {
-                        throw new CreateTableException(
-                                String.format(
-                                        "The table name %s is invalid. Table 
names in Doris must match the regex pattern %s. Please consider renaming the 
table or use the 'excluding-tables' option to filter it out.",
-                                        tableName, 
TableSchema.DORIS_TABLE_REGEX));
-                    }
+                    // Oracle permits table names to include special 
characters like /,
+                    // etc., such as 'A/B'.
+                    // If we attempt to retrieve column information for `A/B` 
using JDBC, it can
+                    // result in an
+                    // ORA-01424 error.
+                    // To circumvent this issue, we substitute `/` with '_' to 
prevent encountering
+                    // the problem.
                     SourceSchema sourceSchema =
                             new OracleSchema(
-                                    metaData, databaseName, schemaName, 
tableName, tableComment);
+                                    metaData,
+                                    databaseName,
+                                    schemaName,
+                                    tableName.replace("/", "_"),
+                                    tableComment);
+                    sourceSchema.setTableName(tableName);

Review Comment:
   Why is there a separate set assignment here?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to