fix:solve the problem of increasing or losing data in incremental situations

This commit is contained in:
xxsc0529 2025-06-20 10:25:03 +08:00
parent c1e34c96c4
commit 4554981133
2 changed files with 110 additions and 55 deletions

View File

@ -80,8 +80,10 @@ public class TaskContext {
}
public String getQuerySql() {
if (readBatchSize == -1 || ObReaderUtils.isOracleMode(compatibleMode)) {
if (readBatchSize == -1) {
return querySql;
} else if (ObReaderUtils.isOracleMode(compatibleMode)) {
return String.format("select * from (%s) where rownum <= %d", querySql, readBatchSize);
} else {
return querySql + " limit " + readBatchSize;
}