mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 08:11:10 +08:00
fix where missing in single table split
This commit is contained in:
parent
1a5f1f0288
commit
d1a17c5c91
@ -93,6 +93,7 @@ public class SingleTableSplitUtil {
|
||||
|
||||
allQuerySql.add(tempQuerySql);
|
||||
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
||||
tempConfig.set(Key.WHERE, (hasWhere ? ("(" + where + ") and") : "") + range);
|
||||
pluginParams.add(tempConfig);
|
||||
}
|
||||
} else {
|
||||
@ -103,6 +104,7 @@ public class SingleTableSplitUtil {
|
||||
+ String.format(" %s IS NOT NULL", splitPkName);
|
||||
allQuerySql.add(tempQuerySql);
|
||||
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
||||
tempConfig.set(Key.WHERE, (hasWhere ? "(" + where + ") and" : "") + String.format(" %s IS NOT NULL", splitPkName));
|
||||
pluginParams.add(tempConfig);
|
||||
}
|
||||
|
||||
@ -118,6 +120,7 @@ public class SingleTableSplitUtil {
|
||||
StringUtils.join(allQuerySql, "\n"));
|
||||
|
||||
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
||||
tempConfig.set(Key.WHERE, (hasWhere ? "(" + where + ") and" : "") + String.format(" %s IS NULL", splitPkName));
|
||||
pluginParams.add(tempConfig);
|
||||
|
||||
return pluginParams;
|
||||
|
Loading…
Reference in New Issue
Block a user