in elitzur-avro/src/main/scala/com/spotify/elitzur/converters/avro/dynamic/dsl/AvroAccessorLogics.scala [45:56]
private def getNullableAccessor(
innerSchema: Schema, field: String, headAccessor: AvroAccessorContainer
): NullableAccessor = {
if (headAccessor.rest.isDefined) {
val recursiveResult = AvroObjMapper.getAvroAccessors(headAccessor.rest.get, innerSchema)
// innerOps represents the list of all accessors to be applied if the avro obj is not null
val innerOps = (headAccessor +: recursiveResult).map(_.ops)
NullableAccessor(field, innerOps)
} else {
NullableAccessor(field, List(headAccessor.ops))
}
}