1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MDEV-25080 Fix a corner case in DataConvert::joinColTypeForUnion().

This commit is contained in:
Gagan Goel
2023-02-27 09:01:24 -05:00
parent 95a314f1fb
commit 8bf545bc2e

View File

@ -2975,7 +2975,7 @@ void DataConvert::joinColTypeForUnion(datatypes::SystemCatalog::TypeHolderStd& u
case datatypes::SystemCatalog::UBIGINT:
case datatypes::SystemCatalog::UDECIMAL:
if (type.scale != 0 && unionedType.scale != 0)
if (type.scale != 0 && (unionedType.scale != 0 || isDecimal(unionedType.colDataType)))
{
const unsigned int digitsBeforeDecimal = type.precision - type.scale;
const unsigned int digitsBeforeDecimalUnion = unionedType.precision - unionedType.scale;