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

MCOL-641 This commit cleans up Row methods and adds couple UT for Row.

This commit is contained in:
Roman Nozdrin
2020-02-20 22:28:38 +00:00
parent b07db9a8f4
commit de85e21c38
9 changed files with 196 additions and 97 deletions

View File

@ -824,14 +824,14 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
if (colType.colDataType == CalpontSystemCatalog::DECIMAL)
{
dec = row.getBinaryField<int128_t>(s);
dataconvert::DataConvert::decimalToString<int128_t>(dec,
dataconvert::DataConvert::decimalToString(dec,
(unsigned)colType.scale, buf,
sizeof(buf), colType.colDataType);
}
else
{
udec = row.getBinaryField<uint128_t>(s);
dataconvert::DataConvert::decimalToString<uint128_t>(udec,
dataconvert::DataConvert::decimalToString(udec,
(unsigned)colType.scale, buf,
sizeof(buf), colType.colDataType);
}
@ -861,7 +861,9 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
case CalpontSystemCatalog::BINARY:
{
Field_varstring* f2 = (Field_varstring*)*f;
f2->store(row.getBinaryField(s).c_str(), 16, f2->charset());
// WIP MCOL-641 Binary representation could contain \0.
char* binaryString = row.getBinaryField<char>(s);
f2->store(binaryString, colType.colWidth, f2->charset());
if ((*f)->null_ptr)
*(*f)->null_ptr &= ~(*f)->null_bit;