1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-4387 Convert dataconvert::decimalToString() into VDecimal and TSInt128 methods

This commit is contained in:
Roman Nozdrin
2020-11-10 17:27:16 +00:00
parent 007b8a5082
commit 58495d0d2f
29 changed files with 793 additions and 878 deletions

View File

@ -640,12 +640,11 @@ string Row::toString() const
case CalpontSystemCatalog::UDECIMAL:
if (colWidths[i] == datatypes::MAXDECIMALWIDTH)
{
unsigned int buflen = datatypes::Decimal::MAXLENGTH16BYTES;
char *buf = (char*)alloca(buflen);
// empty the buffer
dataconvert::DataConvert::decimalToString(getBinaryField<int128_t>(i),
scale[i], buf, buflen, types[i]);
os << buf << " ";
datatypes::VDecimal dec(0,
scale[i],
precision[i],
getBinaryField<int128_t>(i));
os << dec << " ";
break;
}
//fallthrough