You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-641 sum() now works with DECIMAL(38) columns.
TupleAggregateStep class method and buildAggregateColumn() now properly set result data type. doSum() now handles DECIMAL(38) in approprate manner. Low-level null related methods for new binary-based datatypes now handles magic values for binary-based DT.
This commit is contained in:
@ -815,7 +815,6 @@ void Row::initToNull()
|
||||
default:
|
||||
*((uint64_t*) &data[offsets[i]]) = *((uint64_t*) joblist::CPNULLSTRMARK.c_str());
|
||||
memset(&data[offsets[i] + 8], 0, len - 8);
|
||||
//strcpy((char *) &data[offsets[i]], joblist::CPNULLSTRMARK.c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -846,6 +845,13 @@ void Row::initToNull()
|
||||
*((int32_t*) &data[offsets[i]]) = static_cast<int32_t>(joblist::INTNULL);
|
||||
break;
|
||||
|
||||
case 16 :
|
||||
// WIP MCOL-641
|
||||
uint64_t *dec = reinterpret_cast<uint64_t*>(&data[offsets[i]]);
|
||||
+ dec[0] = joblist::BINARYNULL;
|
||||
+ dec[1] = joblist::BINARYNULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
*((int64_t*) &data[offsets[i]]) = static_cast<int64_t>(joblist::BIGINTNULL);
|
||||
break;
|
||||
@ -1039,13 +1045,15 @@ bool Row::isNullValue(uint32_t colIndex) const
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
{
|
||||
uint32_t len = getColumnWidth(colIndex);
|
||||
const uint64_t *dec;
|
||||
|
||||
switch (len)
|
||||
{
|
||||
// MCOL-641 WIP
|
||||
// MCOL-641
|
||||
case 16:
|
||||
return (*((int64_t*) &data[offsets[colIndex]]) == static_cast<int64_t>(joblist::BIGINTNULL));
|
||||
break;
|
||||
dec = reinterpret_cast<const uint64_t*>(&data[offsets[colIndex]]);
|
||||
return ((dec[0] == joblist::BINARYNULL)
|
||||
&& (dec[1] == joblist::BINARYNULL));
|
||||
|
||||
case 1 :
|
||||
return (data[offsets[colIndex]] == joblist::TINYINTNULL);
|
||||
|
Reference in New Issue
Block a user