mirror of
https://github.com/apache/sqoop.git
synced 2025-05-03 04:11:44 +08:00
Merge 498bbdb8b8
into f8beae32a0
This commit is contained in:
commit
bf38792002
@ -74,7 +74,18 @@ protected void processRecord(SqoopRecord r, Context c)
|
|||||||
if (null == fieldMap) {
|
if (null == fieldMap) {
|
||||||
throw new IOException("No field map in record " + r);
|
throw new IOException("No field map in record " + r);
|
||||||
}
|
}
|
||||||
Object keyObj = fieldMap.get(keyColName);
|
Object keyObj = null;
|
||||||
|
if (keyColName.contains(",")) {
|
||||||
|
String connectStr = new String(new byte[]{1});
|
||||||
|
StringBuilder keyFieldsSb = new StringBuilder();
|
||||||
|
for (String str : keyColName.split(",")) {
|
||||||
|
keyFieldsSb.append(connectStr).append(fieldMap.get(str).toString());
|
||||||
|
}
|
||||||
|
keyObj = keyFieldsSb;
|
||||||
|
} else {
|
||||||
|
keyObj = fieldMap.get(keyColName);
|
||||||
|
}
|
||||||
|
|
||||||
if (null == keyObj) {
|
if (null == keyObj) {
|
||||||
throw new IOException("Cannot join values on null key. "
|
throw new IOException("Cannot join values on null key. "
|
||||||
+ "Did you specify a key column that exists?");
|
+ "Did you specify a key column that exists?");
|
||||||
|
Loading…
Reference in New Issue
Block a user