v.25.11Improvement
UNION should unify types
UNION should unify types withVariantif needed whenuse_variant_as_common_typeis set. Resolves #82772. #83246 (Mithun p).
Why it matters
This feature addresses the problem of type unification in UNION queries where columns have differing types that can't be unified by default. By introducing aVariant type as the common type, it ensures smoother query execution without type conflicts.How to use it
To enable this behavior, set the settinguse_variant_as_common_type to 1. For example:SET use_variant_as_common_type = 1;
SELECT ... UNION ...This forces the UNION operation to unify incompatible types using the
Variant type.