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

Revert "fix(MCOL-5386): Bitwise aggregation functions do not work with wide d…"

This reverts commit e0f3bf8322.
This commit is contained in:
Leonid Fedorov
2025-05-20 19:12:33 +04:00
parent 127dd09a7a
commit d09b7496e4
4 changed files with 11 additions and 25 deletions

View File

@ -1538,24 +1538,21 @@ void RowAggregation::doBitOp(const Row& rowIn, int64_t colIn, int64_t colOut, in
case execplan::CalpontSystemCatalog::MEDINT:
case execplan::CalpontSystemCatalog::INT:
case execplan::CalpontSystemCatalog::BIGINT:
{
valIn = rowIn.getIntField(colIn);
break;
}
// According to SQL specification, the result must fit in int64_t,
// therefore, the upper 8 bytes for data types >= 8 bytes are ignored
case execplan::CalpontSystemCatalog::DECIMAL:
case execplan::CalpontSystemCatalog::UDECIMAL:
{
valIn = rowIn.getIntField<8>(colIn);
valIn = rowIn.getIntField(colIn);
if ((fRowGroupIn.getScale())[colIn] != 0)
{
valIn = rowIn.getIntField(colIn);
valIn /= IDB_pow[fRowGroupIn.getScale()[colIn] - 1];
if (valIn > 0)
valIn += 5;
else if (valIn < 0)
valIn -= 5;
valIn /= 10;
}