mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-10 03:09:35 -06:00
* Implement `unionTypes(a, b *types.Type) *types.Type` Implements type merging building off of makeSimplifiedUnion. The difference between siplified unions and merged types are in how structs are handled. In the former, we produce the intersection of input structs to ensure the simplified type is a supertype of the input types. In the later, we produce the union of the input structs which leads to a type that is a subtype of all inputs. Response to review and discussion - Rename to MakeFullUnion to MakeMergedType - Revert to old file naming - Rename makeSimplifiedType to makeSupertype - MakeUnion delegates to makeSupertype. Should prabably be be renamed, but this touches a lot of files, so keeping same for now. fixes: #3204 * Rename to makeSimplifiedType and makeSimplifiedType2