in src/main/java/com/epam/eco/commons/avro/avpath/AvPath.java [215:228]
private boolean operateUpdateForRecordField(
GetRecordFieldResult evalResult,
Function<Object, Object> update) {
if (!evalResult.isValidSchemaField()) {
return false;
}
GenericRecord record = evalResult.getContainerRecord();
String fieldName = evalResult.getFieldName();
Object oldValue = AvroUtils.avroPrimitiveToJava(evalResult.getValue());
Object newValue = update.apply(oldValue);
record.put(fieldName, newValue);
return true;
}