avro-util icon indicating copy to clipboard operation
avro-util copied to clipboard

[feature request] Add Avro agnostic API to make deep copies of a field value.

Open Lincong opened this issue 3 years ago • 0 comments

I have encountered a situation where I need to make deep copies of a field's default value:

Object curFieldDefaultValue = GenericData.get().deepCopy(currField.schema(), GenericData.get().getDefaultValue(currField));

An Avro agnostic API here would be nice.

From @radai-rosenblatt: since the helper supports fetching defaults as either generic or specific "forms", i guess the deep copy functionality would need to support both as well

Lincong avatar Jan 18 '22 20:01 Lincong