Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently DataType::Union has no protection against the same type ID appearing multiple times in its DataType.
Describe the solution you'd like
We should probably validate that the type_ids are unique, and prevent constructing an invalid DataType
Describe alternatives you've considered
We could not do this, much like currently permit invalid DataType::Decimal #2362
Additional context
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently
DataType::Unionhas no protection against the same type ID appearing multiple times in itsDataType.Describe the solution you'd like
We should probably validate that the
type_idsare unique, and prevent constructing an invalidDataTypeDescribe alternatives you've considered
We could not do this, much like currently permit invalid
DataType::Decimal#2362Additional context