You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Merge pull request #3202 from denis0x0D/MCOL-5708
MCOL-5708 Calculate precision and scale for constant decimal.
This commit is contained in:
@ -3821,10 +3821,13 @@ void RowAggregationUM::doNotNullConstantAggregate(const ConstantAggData& aggData
|
||||
auto width = fRow.getColumnWidth(colOut);
|
||||
if (width == datatypes::MAXDECIMALWIDTH)
|
||||
{
|
||||
int precision, scale;
|
||||
// MCOL-5708 Calculate precision and scale based on the given value.
|
||||
datatypes::decimalPrecisionAndScale(aggData.fConstValue, precision, scale);
|
||||
datatypes::TypeHolderStd colType;
|
||||
colType.colWidth = width;
|
||||
colType.precision = fRow.getPrecision(i);
|
||||
colType.scale = fRow.getScale(i);
|
||||
colType.precision = precision;
|
||||
colType.scale = scale;
|
||||
colType.colDataType = colDataType;
|
||||
int128_t constValue = colType.decimal128FromString(aggData.fConstValue);
|
||||
int128_t sum;
|
||||
|
Reference in New Issue
Block a user