Takes the encoded values from the fields of a type T and builds an ImmutableRecord from them, using the given schema.
Takes the encoded values from the fields of a type T and builds an ImmutableRecord from them, using the given schema.
The schema for a record must be of Type Schema.Type.RECORD but the case class may have been a subclass of a trait. In this case the schema will be a union and so we must extract the correct subschema from the union.
the full name of the record in Avro, taking into account Avro modifiers such as @AvroNamespace and @AvroErasedName. This name is used for extracting the specific subschema from a union schema.
Encodes a field in a case class by bringing in an implicit encoder for the field's type.
Encodes a field in a case class by bringing in an implicit encoder for the field's type. The schema passed in here is the schema for the container type, and the fieldName is the name of the field in the avro schema.
Note: The field may be a member of a subclass of a trait, in which case the schema passed in will be a union. Therefore we must extract the correct subschema from the union. We can do this by using the fullName of the containing class, and comparing to the record full names in the subschemas.