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

MCOL-641 1. Add support for int128_t in ParsedColumnFilter.

2. Set Decimal precision in SimpleColumn::evaluate().
3. Add support for int128_t in ConstantColumn.
4. Set IDB_Decimal::s128Value in buildDecimalColumn().
5. Use width 16 as first if predicate for branching based on decimal width.
This commit is contained in:
Gagan Goel
2020-03-13 15:42:25 -04:00
committed by Roman Nozdrin
parent 0bd172cd6e
commit 74b64eb4f1
21 changed files with 348 additions and 238 deletions

View File

@ -4365,8 +4365,15 @@ ConstantColumn* buildDecimalColumn(Item* item, gp_walk_info& gwi)
columnstore_decimal_val << str->ptr()[i];
}
columnstore_decimal.value = strtoll(columnstore_decimal_val.str().c_str(), 0, 10);
if (idp->decimal_precision() <= 18)
columnstore_decimal.value = strtoll(columnstore_decimal_val.str().c_str(), 0, 10);
else
{
bool dummy = false;
columnstore_decimal.s128Value = dataconvert::strtoll128(columnstore_decimal_val.str().c_str(), dummy, 0);
}
// TODO MCOL-641 Add support here
if (gwi.internalDecimalScale >= 0 && idp->decimals > (uint)gwi.internalDecimalScale)
{
columnstore_decimal.scale = gwi.internalDecimalScale;

View File

@ -805,7 +805,7 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
case CalpontSystemCatalog::DECIMAL:
case CalpontSystemCatalog::UDECIMAL:
{
if (colType.colWidth == 16)
if (LIKELY(colType.colWidth == datatypes::MAXDECIMALWIDTH))
{
// unset null bit first
// Might be redundant