Seems like annotation @AvroSortPriority sorts records in Union in reversed order comparing with Enums, as well as with Enums/Unions from avro4s:4.x.
Probably the reason is a sort order here in Subtypes. Comparing with enums in 5.x and unions in 4.x, it seems to me that the Ordering compares A with B - ascending order, when instead it should compare B to A - descending.
Since AvroSortPriority is descending-based (if we could say so), then there should be B compare A.
The same (but reversed) issue with AvroUnionPosition will be automatically resolved since these two annotations are tightly coupled anyway.
Seems like annotation
@AvroSortPriority
sorts records in Union in reversed order comparing with Enums, as well as with Enums/Unions fromavro4s:4.x
.Probably the reason is a sort order here in Subtypes. Comparing with enums in 5.x and unions in 4.x, it seems to me that the Ordering compares A with B - ascending order, when instead it should compare B to A - descending. Since
AvroSortPriority
is descending-based (if we could say so), then there should beB compare A
.The same (but reversed) issue with
AvroUnionPosition
will be automatically resolved since these two annotations are tightly coupled anyway.