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

MCOL-641 Switched to DataConvert static methods in joblist code.

Replaced BINARYEMPTYROW and BINARYNULL values. We need to have
separate magic values for numeric and non-numeric binary types
b/c numeric cant tolerate losing 0 used for magics previously.

atoi128() now parses minus sign and produces negative values.

RowAggregation::isNull() now uses Row::isNull() for DECIMAL.
This commit is contained in:
drrtuy
2020-02-04 23:02:39 +03:00
committed by Roman Nozdrin
parent 0ff0472842
commit 84f9821720
6 changed files with 59 additions and 48 deletions

View File

@ -846,12 +846,12 @@ void Row::initToNull()
break;
case 16 :
// WIP MCOL-641
{
uint64_t *dec = reinterpret_cast<uint64_t*>(&data[offsets[i]]);
+ dec[0] = joblist::BINARYNULL;
+ dec[1] = joblist::BINARYNULL;
dec[0] = joblist::BINARYNULL;
dec[1] = joblist::BINARYNULL;
break;
}
default:
*((int64_t*) &data[offsets[i]]) = static_cast<int64_t>(joblist::BIGINTNULL);
break;
@ -1045,15 +1045,15 @@ bool Row::isNullValue(uint32_t colIndex) const
case CalpontSystemCatalog::UDECIMAL:
{
uint32_t len = getColumnWidth(colIndex);
const uint64_t *dec;
const int64_t *dec;
switch (len)
{
// MCOL-641
case 16:
dec = reinterpret_cast<const uint64_t*>(&data[offsets[colIndex]]);
return ((dec[0] == joblist::BINARYNULL)
&& (dec[1] == joblist::BINARYNULL));
dec = reinterpret_cast<const int64_t*>(&data[offsets[colIndex]]);
return ((dec[0] == static_cast<int64_t>(joblist::BINARYNULL))
&& (dec[1] == static_cast<int64_t>(joblist::BINARYNULL)));
case 1 :
return (data[offsets[colIndex]] == joblist::TINYINTNULL);