You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-641 PoC version for DECIMAL(38) using BINARY as a basis.
This commit is contained in:
@ -1224,8 +1224,12 @@ DataConvert::convertColumnData(const CalpontSystemCatalog::ColType& colType,
|
||||
value = (long long) number_int_value(data, colType, pushWarning, noRoundup);
|
||||
break;
|
||||
|
||||
// MCOL-641 WIP
|
||||
// use string2BCD conversion here + set sign
|
||||
case CalpontSystemCatalog::DECIMAL:
|
||||
if (colType.colWidth == 1)
|
||||
if (colType.colWidth == 16)
|
||||
value = data;
|
||||
else if (colType.colWidth == 1)
|
||||
value = (char) number_int_value(data, colType, pushWarning, noRoundup);
|
||||
else if (colType.colWidth == 2)
|
||||
value = (short) number_int_value(data, colType, pushWarning, noRoundup);
|
||||
@ -1233,9 +1237,11 @@ DataConvert::convertColumnData(const CalpontSystemCatalog::ColType& colType,
|
||||
value = (int) number_int_value(data, colType, pushWarning, noRoundup);
|
||||
else if (colType.colWidth == 8)
|
||||
value = (long long) number_int_value(data, colType, pushWarning, noRoundup);
|
||||
else if (colType.colWidth == 32)
|
||||
value = data;
|
||||
|
||||
break;
|
||||
|
||||
// MCOL-641 Implement UDECIMAL
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
|
||||
// UDECIMAL numbers may not be negative
|
||||
|
@ -746,6 +746,7 @@ inline int64_t Row::getIntField(uint32_t colIndex) const
|
||||
return *((int64_t*) &data[offsets[colIndex]]);
|
||||
|
||||
default:
|
||||
std::cout << "Row::getIntField getColumnWidth(colIndex) " << getColumnWidth(colIndex) << std::endl;
|
||||
idbassert(0);
|
||||
throw std::logic_error("Row::getIntField(): bad length.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user