mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 17:40:28 +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);
|
allQuerySql.add(tempQuerySql);
|
||||||
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
||||||
|
tempConfig.set(Key.WHERE, (hasWhere ? ("(" + where + ") and") : "") + range);
|
||||||
pluginParams.add(tempConfig);
|
pluginParams.add(tempConfig);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -103,6 +104,7 @@ public class SingleTableSplitUtil {
|
|||||||
+ String.format(" %s IS NOT NULL", splitPkName);
|
+ String.format(" %s IS NOT NULL", splitPkName);
|
||||||
allQuerySql.add(tempQuerySql);
|
allQuerySql.add(tempQuerySql);
|
||||||
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
||||||
|
tempConfig.set(Key.WHERE, (hasWhere ? "(" + where + ") and" : "") + String.format(" %s IS NOT NULL", splitPkName));
|
||||||
pluginParams.add(tempConfig);
|
pluginParams.add(tempConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,6 +120,7 @@ public class SingleTableSplitUtil {
|
|||||||
StringUtils.join(allQuerySql, "\n"));
|
StringUtils.join(allQuerySql, "\n"));
|
||||||
|
|
||||||
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
tempConfig.set(Key.QUERY_SQL, tempQuerySql);
|
||||||
|
tempConfig.set(Key.WHERE, (hasWhere ? "(" + where + ") and" : "") + String.format(" %s IS NULL", splitPkName));
|
||||||
pluginParams.add(tempConfig);
|
pluginParams.add(tempConfig);
|
||||||
|
|
||||||
return pluginParams;
|
return pluginParams;
|
||||||
|
Loading…
Reference in New Issue
Block a user