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

MCOL-4313 Introduced TSInt128 that is a storage class for int128

Removed uint128 from joblist/lbidlist.*

Another toString() method for wide-decimal that is EMPTY/NULL aware

Unified decimal processing in WF functions

Fixed a potential issue in EqualCompData::operator() for
    wide-decimal processing

Fixed some signedness warnings
This commit is contained in:
Roman Nozdrin
2020-11-06 10:52:43 +00:00
parent d5c6645ba1
commit 3eb26c0d4a
35 changed files with 505 additions and 364 deletions

View File

@ -42,6 +42,7 @@ using namespace boost;
#include "primproc.h"
#include "dataconvert.h"
#include "mcs_decimal.h"
using namespace logging;
using namespace dbbc;
using namespace primitives;
@ -765,6 +766,8 @@ inline void store(const NewColRequestHeader* in,
default:
std::cout << __func__ << " WARNING!!! unspecified column width." << std::endl;
[[fallthrough]];
case 8:
ptr2 += (rid << 3);
memcpy(ptr1, ptr2, 8);
@ -1723,22 +1726,31 @@ inline void p_Col_bin_ridArray(NewColRequestHeader* in,
// Set the min and max if necessary. Ignore nulls.
if (out->ValidMinMax && !isNull && !isEmpty)
{
if (in->DataType == CalpontSystemCatalog::CHAR || in->DataType == CalpontSystemCatalog::VARCHAR)
{
// !!! colCompare is overloaded with int128_t only yet.
if (colCompare(out->Min, val, COMPARE_GT, false, in->DataType, W, placeholderRegex))
{
out->Min = val;
}
if (colCompare(out->Max, val, COMPARE_LT, false, in->DataType, W, placeholderRegex))
{
out->Max = val;
}
}
else
{
if (out->Min > val)
{
out->Min = val;
}
if (out->Max < val)
{
out->Max = val;
}
}
}
@ -1828,6 +1840,7 @@ void PrimitiveProcessor::p_Col(NewColRequestHeader* in, NewColResultHeader* out,
case 32:
std::cout << __func__ << " WARNING!!! Not implemented for 32 byte data types." << std::endl;
[[fallthrough]];
default:
idbassert(0);
@ -1918,7 +1931,7 @@ boost::shared_ptr<ParsedColumnFilter> parseColumnFilter
case 8:
ret->prestored_argVals[argIndex] = *reinterpret_cast<const uint64_t*>(args->val);
break;
break;
}
}
else
@ -1956,7 +1969,11 @@ boost::shared_ptr<ParsedColumnFilter> parseColumnFilter
break;
case 16:
ret->prestored_argVals128[argIndex] = *reinterpret_cast<const int128_t*>(args->val);
{
datatypes::TSInt128::assignPtrPtr(&(ret->prestored_argVals128[argIndex]),
args->val);
break;
}
}
}

View File

@ -21,8 +21,6 @@ set(PrimProc_SRCS
umsocketselector.cpp
../../utils/common/crashtrace.cpp)
#PrimProc_CXXFLAGS = $(march_flags) $(AM_CXXFLAGS)
add_executable(PrimProc ${PrimProc_SRCS})
add_dependencies(PrimProc loggingcpp)

View File

@ -40,6 +40,7 @@ using namespace std;
#include "primitiveserver.h"
#include "primproc.h"
#include "stats.h"
#include "datatypes/mcs_int128.h"
using namespace messageqcpp;
using namespace rowgroup;
@ -231,11 +232,7 @@ void ColumnCommand::loadData()
{
ByteStream::hexbyte h;
utils::getEmptyRowValue(colType.colDataType, colType.colWidth, (uint8_t*)&h);
__asm__ volatile("movups %1,%0"
:"=m" ( hPtr[idx] ) // output
:"v"( h ) // input
: "memory" // clobbered
);
datatypes::TSInt128::storeUnaligned(hPtr + idx, h);
}
}
@ -332,18 +329,7 @@ void ColumnCommand::process_OT_BOTH()
bpp->relRids[i] = *((uint16_t*) &bpp->outputMsg[pos]);
pos += 2;
int128_t* int128Ptr = reinterpret_cast<int128_t*>(&bpp->outputMsg[pos]);
__asm__ volatile("movdqu %0,%%xmm0;"
:
:"m"( *int128Ptr ) // input
:"xmm0" // clobbered
);
__asm__ volatile("movups %%xmm0,%0;"
: "=m" (wide128Values[i])// output
: // input
: "memory", "xmm0" // clobbered
);
datatypes::TSInt128::assignPtrPtr(&wide128Values[i], &bpp->outputMsg[pos]);
pos += 16;
}