check if field exists before rename

This commit is contained in:
dxfeng10
2021-11-11 15:06:48 +08:00
committed by GitHub
parent 4a88063416
commit d663729415

View File

@@ -197,8 +197,10 @@ public class ListFunc implements IFunc {
throw new FizzRuntimeException(
"invalid fieldPair: " + fieldPair + " , field pair pattern is: oldFieldName:newFieldName");
}
m.put(parts[1], m.get(parts[0]));
m.remove(parts[0]);
if (m.containsKey(parts[0])) {
m.put(parts[1], m.get(parts[0]));
m.remove(parts[0]);
}
}
}
return data;