Method CreateWithDefaults
CreateWithDefaults(RecordSchema)
Creates a record whose fields hold their schema defaults; a field without a default is null. Each call
converts the defaults again, so records never share an array, map or record from a default.
public static GenericRecord CreateWithDefaults(RecordSchema schema)
Parameters
schemaRecordSchemaThe record schema.
Returns
Exceptions
- AvroDataException
A default does not match its field's schema.
- See Also