This is an automated email from the ASF dual-hosted git repository.
diwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-flink-connector.git
The following commit(s) were added to refs/heads/master by this push:
new 6f3efe0a [fix](oracle-cdc) fix oracle regular expresion too long(#505)
6f3efe0a is described below
commit 6f3efe0aa802e9f3468509814610693d674fd4ac
Author: wudi <[email protected]>
AuthorDate: Fri Nov 1 11:22:51 2024 +0800
[fix](oracle-cdc) fix oracle regular expresion too long(#505)
---
.../doris/flink/tools/cdc/oracle/OracleDatabaseSync.java | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git
a/flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/oracle/OracleDatabaseSync.java
b/flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/oracle/OracleDatabaseSync.java
index 9b684454..1a6a4187 100644
---
a/flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/oracle/OracleDatabaseSync.java
+++
b/flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/oracle/OracleDatabaseSync.java
@@ -164,11 +164,16 @@ public class OracleDatabaseSync extends DatabaseSync {
Preconditions.checkNotNull(databaseName, "database-name in oracle is
required");
Preconditions.checkNotNull(schemaName, "schema-name in oracle is
required");
String tableName = config.get(OracleSourceOptions.TABLE_NAME);
- // When debezium incrementally reads, it will be judged based on
regexp_like.
- // When the regular length exceeds 512, an error will be reported,
- // like ORA-12733: regular expression too long
- if (tableName.length() > 512) {
- tableName = StringUtils.isNullOrWhitespaceOnly(includingTables) ?
".*" : tableName;
+ // When debezium incrementally reads (refer
LogMinerQueryBuilder.listOfPatternsToSql),
+ // it will be judged based on regexp_like. When the regular length
exceeds 512, an error
+ // will be reported, like ORA-12733: regular expression too long
+ if (tableName.length() > 450) {
+ // REGEXP_LIKE('^SCHEMA.(TBL1|TBL2)$')
+ if (StringUtils.isNullOrWhitespaceOnly(excludingTables)
+ && (StringUtils.isNullOrWhitespaceOnly(includingTables)
+ || ".*".equals(includingTables))) {
+ tableName = ".*";
+ }
}
String url = config.get(OracleSourceOptions.URL);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]