PR #384 added promotion rules that recursively promote the eltype and reftype, but this has the drawback that the resulting
type is often not a supertype of the input types, forcing a conversion to a CategoricalArray which may have a Union type.
Instead, do the same as Array and AbstractArray fallbacks, which simply call promote_typejoin if eltypes do not match.
PR #384 added promotion rules that recursively promote the eltype and reftype, but this has the drawback that the resulting type is often not a supertype of the input types, forcing a conversion to a
CategoricalArray
which may have aUnion
type. Instead, do the same asArray
andAbstractArray
fallbacks, which simply callpromote_typejoin
if eltypes do not match.