1
0

[HUDI-1892] Fix NPE when avro field value is null (#3051)

This commit is contained in:
Vinay Patil
2021-06-09 03:42:18 +05:30
committed by GitHub
parent 75d663f65d
commit 11360f707e

View File

@@ -94,6 +94,6 @@ public class OverwriteWithLatestAvroPayload extends BaseAvroPayload
* Return true if value equals defaultValue otherwise false.
*/
public Boolean overwriteField(Object value, Object defaultValue) {
return defaultValue == null ? value == null : defaultValue.toString().equals(value.toString());
return defaultValue == null ? value == null : defaultValue.toString().equals(String.valueOf(value));
}
}