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

get rid of pointers for 128 fields

This commit is contained in:
Leonid Fedorov
2022-08-26 15:12:22 +00:00
parent 0863ecd279
commit d2432f9bf6
11 changed files with 40 additions and 82 deletions

View File

@ -552,8 +552,7 @@ int TypeHandlerXDecimal::storeValueToField64(rowgroup::Row& row, int pos, StoreF
int TypeHandlerXDecimal::storeValueToField128(rowgroup::Row& row, int pos, StoreField* f) const int TypeHandlerXDecimal::storeValueToField128(rowgroup::Row& row, int pos, StoreField* f) const
{ {
int128_t* decPtr = row.getTSInt128Field(pos).getValPtr(); return f->store_decimal128(datatypes::Decimal(row.getTSInt128Field(pos), f->scale(), f->precision()));
return f->store_decimal128(datatypes::Decimal(0, f->scale(), f->precision(), decPtr));
} }
int TypeHandlerStr::storeValueToFieldBlobText(rowgroup::Row& row, int pos, StoreField* f) const int TypeHandlerStr::storeValueToFieldBlobText(rowgroup::Row& row, int pos, StoreField* f) const

View File

@ -306,11 +306,6 @@ class TSInt128
return s128Value; return s128Value;
} }
inline int128_t* getValPtr()
{
return &s128Value;
}
// print int128_t parts represented as PODs // print int128_t parts represented as PODs
uint8_t printPodParts(char* buf, const int128_t& high, const int128_t& mid, const int128_t& low) const; uint8_t printPodParts(char* buf, const int128_t& high, const int128_t& mid, const int128_t& low) const;

View File

@ -50,7 +50,6 @@ ReturnedColumn::ReturnedColumn()
, fColPosition(-1) , fColPosition(-1)
, fHasAggregate(false) , fHasAggregate(false)
, fInputIndex(-1) , fInputIndex(-1)
, fInputOffset(-1)
, fOutputIndex(-1) , fOutputIndex(-1)
, fExpressionId((uint32_t)-1) , fExpressionId((uint32_t)-1)
{ {
@ -71,7 +70,6 @@ ReturnedColumn::ReturnedColumn(const string& sql)
, fHasAggregate(false) , fHasAggregate(false)
, fData(sql) , fData(sql)
, fInputIndex(-1) , fInputIndex(-1)
, fInputOffset(-1)
, fOutputIndex(-1) , fOutputIndex(-1)
, fExpressionId((uint32_t)-1) , fExpressionId((uint32_t)-1)
{ {
@ -91,7 +89,6 @@ ReturnedColumn::ReturnedColumn(const uint32_t sessionID, const bool returnAll)
, fColPosition(-1) , fColPosition(-1)
, fHasAggregate(false) , fHasAggregate(false)
, fInputIndex(-1) , fInputIndex(-1)
, fInputOffset(-1)
, fOutputIndex(-1) , fOutputIndex(-1)
, fExpressionId((uint32_t)-1) , fExpressionId((uint32_t)-1)
{ {
@ -113,7 +110,6 @@ ReturnedColumn::ReturnedColumn(const ReturnedColumn& rhs, const uint32_t session
, fHasAggregate(rhs.fHasAggregate) , fHasAggregate(rhs.fHasAggregate)
, fData(rhs.fData) , fData(rhs.fData)
, fInputIndex(rhs.fInputIndex) , fInputIndex(rhs.fInputIndex)
, fInputOffset(rhs.fInputOffset)
, fOutputIndex(rhs.fOutputIndex) , fOutputIndex(rhs.fOutputIndex)
, fExpressionId(rhs.fExpressionId) , fExpressionId(rhs.fExpressionId)
{ {
@ -146,7 +142,6 @@ void ReturnedColumn::serialize(messageqcpp::ByteStream& b) const
b << (uint64_t)fColSource; b << (uint64_t)fColSource;
b << (int64_t)fColPosition; b << (int64_t)fColPosition;
b << (uint32_t)fInputIndex; b << (uint32_t)fInputIndex;
b << (uint32_t)fInputOffset;
b << (uint32_t)fOutputIndex; b << (uint32_t)fOutputIndex;
b << (int32_t)fSequence; b << (int32_t)fSequence;
b << (uint8_t)fReturnAll; b << (uint8_t)fReturnAll;
@ -169,7 +164,6 @@ void ReturnedColumn::unserialize(messageqcpp::ByteStream& b)
b >> (uint64_t&)fColSource; b >> (uint64_t&)fColSource;
b >> (int64_t&)fColPosition; b >> (int64_t&)fColPosition;
b >> (uint32_t&)fInputIndex; b >> (uint32_t&)fInputIndex;
b >> (uint32_t&)fInputOffset;
b >> (uint32_t&)fOutputIndex; b >> (uint32_t&)fOutputIndex;
b >> (int32_t&)fSequence; b >> (int32_t&)fSequence;
b >> (uint8_t&)fReturnAll; b >> (uint8_t&)fReturnAll;

View File

@ -372,7 +372,6 @@ class ReturnedColumn : public TreeNode
protected: protected:
std::string fErrMsg; /// error occured in evaluation std::string fErrMsg; /// error occured in evaluation
uint32_t fInputIndex; /// index to the input rowgroup uint32_t fInputIndex; /// index to the input rowgroup
uint32_t fInputOffset; /// index to the input rowgroup
uint32_t fOutputIndex; /// index to the output rowgroup uint32_t fOutputIndex; /// index to the output rowgroup
uint32_t fExpressionId; /// unique id for this expression uint32_t fExpressionId; /// unique id for this expression
}; };

View File

@ -489,12 +489,6 @@ bool SimpleColumn::singleTable(CalpontSystemCatalog::TableAliasName& tan)
// @todo move to inline // @todo move to inline
void SimpleColumn::evaluate(Row& row, bool& isNull) void SimpleColumn::evaluate(Row& row, bool& isNull)
{ {
// TODO Move this block into an appropriate place
if (UNLIKELY((int)(fInputOffset == (uint32_t)-1)))
{
fInputOffset = row.getOffset(fInputIndex);
}
bool isNull2 = row.isNullValue(fInputIndex); bool isNull2 = row.isNullValue(fInputIndex);
if (isNull2) if (isNull2)
@ -632,8 +626,7 @@ void SimpleColumn::evaluate(Row& row, bool& isNull)
{ {
case 16: case 16:
{ {
datatypes::TSInt128::assignPtrPtr(&fResult.decimalVal.s128Value, fResult.decimalVal.s128Value = row.getTSInt128Field(fInputIndex).getValue();
row.getBinaryField_offset<int128_t>(fInputOffset));
break; break;
} }
case 1: case 1:

View File

@ -32,6 +32,7 @@
#include <cassert> #include <cassert>
#include "joblisttypes.h" #include "joblisttypes.h"
#include "mcs_basic_types.h"
#include "resourcemanager.h" #include "resourcemanager.h"
#include "groupconcat.h" #include "groupconcat.h"
@ -74,9 +75,9 @@ inline bool minMax(T d1, T d2, int type)
return d1 > d2; return d1 > d2;
} }
inline bool minMax(int128_t* d1, int128_t* d2, int type) inline bool minMax(int128_t d1, int128_t d2, int type)
{ {
return (type == rowgroup::ROWAGG_MIN) ? *d1 < *d2 : *d1 > *d2; return (type == rowgroup::ROWAGG_MIN) ? d1 < d2 : d1 > d2;
} }
inline int64_t getIntNullValue(int colType) inline int64_t getIntNullValue(int colType)
@ -247,13 +248,12 @@ const static_any::any& RowAggregation::strTypeId(typeStr);
static const string overflowMsg("Aggregation overflow."); static const string overflowMsg("Aggregation overflow.");
inline void RowAggregation::updateIntMinMax(int128_t* val1, int128_t* val2, int64_t col, int func) inline void RowAggregation::updateIntMinMax(int128_t val1, int128_t val2, int64_t col, int func)
{ {
int32_t colOutOffset = fRow.getOffset(col);
if (isNull(fRowGroupOut, fRow, col)) if (isNull(fRowGroupOut, fRow, col))
fRow.setBinaryField_offset(val1, sizeof(int128_t), colOutOffset); fRow.setInt128Field(val1, col);
else if (minMax(val1, val2, func)) else if (minMax(val1, val2, func))
fRow.setBinaryField_offset(val1, sizeof(int128_t), colOutOffset); fRow.setInt128Field(val1, col);
} }
inline void RowAggregation::updateIntMinMax(int64_t val1, int64_t val2, int64_t col, int func) inline void RowAggregation::updateIntMinMax(int64_t val1, int64_t val2, int64_t col, int func)
@ -867,8 +867,8 @@ void RowAggregation::initMapData(const Row& rowIn)
{ {
if (LIKELY(rowIn.getColumnWidth(colIn) == datatypes::MAXDECIMALWIDTH)) if (LIKELY(rowIn.getColumnWidth(colIn) == datatypes::MAXDECIMALWIDTH))
{ {
uint32_t colOutOffset = fRow.getOffset(colOut); int128_t value = rowIn.getTSInt128Field(colIn).getValue();
fRow.setBinaryField_offset(rowIn.getTSInt128Field(colIn).getValPtr(), sizeof(int128_t), colOutOffset); fRow.setInt128Field(value, colOut);
} }
else if (rowIn.getColumnWidth(colIn) <= datatypes::MAXLEGACYWIDTH) else if (rowIn.getColumnWidth(colIn) <= datatypes::MAXLEGACYWIDTH)
{ {
@ -1128,7 +1128,7 @@ void RowAggregation::doMinMax(const Row& rowIn, int64_t colIn, int64_t colOut, i
{ {
if (LIKELY(rowIn.getColumnWidth(colIn) == datatypes::MAXDECIMALWIDTH)) if (LIKELY(rowIn.getColumnWidth(colIn) == datatypes::MAXDECIMALWIDTH))
{ {
updateIntMinMax(rowIn.getTSInt128Field(colIn).getValPtr(), fRow.getTSInt128Field(colOut).getValPtr(), colOut, updateIntMinMax(rowIn.getTSInt128Field(colIn).getValue(), fRow.getTSInt128Field(colOut).getValue(), colOut,
funcType); funcType);
} }
else if (rowIn.getColumnWidth(colIn) <= datatypes::MAXLEGACYWIDTH) else if (rowIn.getColumnWidth(colIn) <= datatypes::MAXLEGACYWIDTH)
@ -1226,7 +1226,7 @@ void RowAggregation::doSum(const Row& rowIn, int64_t colIn, int64_t colOut, int
datatypes::SystemCatalog::ColDataType colDataType = rowIn.getColType(colIn); datatypes::SystemCatalog::ColDataType colDataType = rowIn.getColType(colIn);
long double valIn = 0; long double valIn = 0;
bool isWideDataType = false; bool isWideDataType = false;
void* wideValInPtr = nullptr; int128_t wideValue = 0;
if (rowIn.isNullValue(colIn)) if (rowIn.isNullValue(colIn))
return; return;
@ -1260,8 +1260,7 @@ void RowAggregation::doSum(const Row& rowIn, int64_t colIn, int64_t colOut, int
isWideDataType = width == datatypes::MAXDECIMALWIDTH; isWideDataType = width == datatypes::MAXDECIMALWIDTH;
if (LIKELY(isWideDataType)) if (LIKELY(isWideDataType))
{ {
int128_t* dec = rowIn.getTSInt128Field(colIn).getValPtr(); wideValue = rowIn.getTSInt128Field(colIn).getValue();
wideValInPtr = reinterpret_cast<void*>(dec);
} }
else if (width <= datatypes::MAXLEGACYWIDTH) else if (width <= datatypes::MAXLEGACYWIDTH)
{ {
@ -1341,16 +1340,15 @@ void RowAggregation::doSum(const Row& rowIn, int64_t colIn, int64_t colOut, int
} }
else if (isWideDataType) else if (isWideDataType)
{ {
int128_t* dec = reinterpret_cast<int128_t*>(wideValInPtr);
if (LIKELY(!isNull(fRowGroupOut, fRow, colOut))) if (LIKELY(!isNull(fRowGroupOut, fRow, colOut)))
{ {
int128_t valOut = fRow.getTSInt128Field(colOut).getValue(); int128_t valOut = fRow.getTSInt128Field(colOut).getValue();
int128_t sum = valOut + *dec; int128_t sum = valOut + wideValue;
fRow.setBinaryField(&sum, colOut); fRow.setInt128Field(sum, colOut);
} }
else else
{ {
fRow.setBinaryField(dec, colOut); fRow.setInt128Field(wideValue, colOut);
} }
} }
else else
@ -1762,7 +1760,7 @@ void RowAggregation::doAvg(const Row& rowIn, int64_t colIn, int64_t colOut, int6
datatypes::SystemCatalog::ColDataType colDataType = rowIn.getColType(colIn); datatypes::SystemCatalog::ColDataType colDataType = rowIn.getColType(colIn);
long double valIn = 0; long double valIn = 0;
bool isWideDataType = false; bool isWideDataType = false;
void* wideValInPtr = nullptr; int128_t wideValue = 0;
switch (colDataType) switch (colDataType)
{ {
@ -1793,8 +1791,7 @@ void RowAggregation::doAvg(const Row& rowIn, int64_t colIn, int64_t colOut, int6
isWideDataType = width == datatypes::MAXDECIMALWIDTH; isWideDataType = width == datatypes::MAXDECIMALWIDTH;
if (LIKELY(isWideDataType)) if (LIKELY(isWideDataType))
{ {
int128_t* dec = rowIn.getTSInt128Field(colIn).getValPtr(); wideValue = rowIn.getTSInt128Field(colIn).getValue();
wideValInPtr = reinterpret_cast<void*>(dec);
} }
else if (width <= datatypes::MAXLEGACYWIDTH) else if (width <= datatypes::MAXLEGACYWIDTH)
{ {
@ -1871,16 +1868,15 @@ void RowAggregation::doAvg(const Row& rowIn, int64_t colIn, int64_t colOut, int6
} }
else if (isWideDataType) else if (isWideDataType)
{ {
int128_t* dec = reinterpret_cast<int128_t*>(wideValInPtr);
if (LIKELY(notFirstValue)) if (LIKELY(notFirstValue))
{ {
int128_t valOut = fRow.getTSInt128Field(colOut).getValue(); int128_t valOut = fRow.getTSInt128Field(colOut).getValue();
int128_t sum = valOut + *dec; int128_t sum = valOut + wideValue;
fRow.setBinaryField(&sum, colOut); fRow.setInt128Field(sum, colOut);
} }
else else
{ {
fRow.setBinaryField(dec, colOut); fRow.setInt128Field(wideValue, colOut);
} }
} }
else else
@ -2618,21 +2614,20 @@ void RowAggregationUM::calculateAvgColumns()
} }
else else
{ {
uint32_t offset = fRow.getOffset(colOut);
uint32_t scale = fRow.getScale(colOut); uint32_t scale = fRow.getScale(colOut);
// Get multiplied to deliver AVG with the scale closest // Get multiplied to deliver AVG with the scale closest
// to the expected original scale + 4. // to the expected original scale + 4.
// There is a counterpart in buildAggregateColumn. // There is a counterpart in buildAggregateColumn.
datatypes::Decimal::setScalePrecision4Avg(precision, scale); datatypes::Decimal::setScalePrecision4Avg(precision, scale);
int128_t* sumPnt = fRow.getBinaryField_offset<int128_t>(offset); int128_t sumPnt = fRow.getTSInt128Field(colOut).getValue();
uint32_t scaleDiff = scale - fRow.getScale(colOut); uint32_t scaleDiff = scale - fRow.getScale(colOut);
// multiplication overflow check // multiplication overflow check
datatypes::MultiplicationOverflowCheck multOp; datatypes::MultiplicationOverflowCheck multOp;
int128_t sum = 0; int128_t sum = 0;
if (scaleDiff > 0) if (scaleDiff > 0)
multOp(*sumPnt, datatypes::mcs_pow_10[scaleDiff], sum); multOp(sumPnt, datatypes::mcs_pow_10[scaleDiff], sum);
else else
sum = *sumPnt; sum = sumPnt;
datatypes::lldiv_t_128 avgAndRem = datatypes::lldiv128(sum, cnt); datatypes::lldiv_t_128 avgAndRem = datatypes::lldiv128(sum, cnt);
// Round the last digit // Round the last digit
if (datatypes::abs(avgAndRem.rem) * 2 >= (int128_t)cnt) if (datatypes::abs(avgAndRem.rem) * 2 >= (int128_t)cnt)
@ -2646,7 +2641,7 @@ void RowAggregationUM::calculateAvgColumns()
avgAndRem.quot++; avgAndRem.quot++;
} }
} }
fRow.setBinaryField_offset(&avgAndRem.quot, sizeof(avgAndRem.quot), offset); fRow.setInt128Field(avgAndRem.quot, colOut);
} }
} }
} }
@ -4151,7 +4146,7 @@ void RowAggregationUMP2::doAvg(const Row& rowIn, int64_t colIn, int64_t colOut,
datatypes::SystemCatalog::ColDataType colDataType = rowIn.getColType(colIn); datatypes::SystemCatalog::ColDataType colDataType = rowIn.getColType(colIn);
long double valIn = 0; long double valIn = 0;
bool isWideDataType = false; bool isWideDataType = false;
void* wideValInPtr = nullptr; int128_t wideValue = 0;
switch (colDataType) switch (colDataType)
{ {
@ -4182,8 +4177,7 @@ void RowAggregationUMP2::doAvg(const Row& rowIn, int64_t colIn, int64_t colOut,
isWideDataType = width == datatypes::MAXDECIMALWIDTH; isWideDataType = width == datatypes::MAXDECIMALWIDTH;
if (LIKELY(isWideDataType)) if (LIKELY(isWideDataType))
{ {
int128_t* dec = rowIn.getTSInt128Field(colIn).getValPtr(); wideValue = rowIn.getTSInt128Field(colIn).getValue();
wideValInPtr = reinterpret_cast<void*>(dec);
} }
else if (width <= datatypes::MAXLEGACYWIDTH) else if (width <= datatypes::MAXLEGACYWIDTH)
{ {
@ -4250,17 +4244,16 @@ void RowAggregationUMP2::doAvg(const Row& rowIn, int64_t colIn, int64_t colOut,
} }
else if (isWideDataType) else if (isWideDataType)
{ {
int128_t* dec = reinterpret_cast<int128_t*>(wideValInPtr);
if (LIKELY(cnt > 0)) if (LIKELY(cnt > 0))
{ {
int128_t valOut = fRow.getTSInt128Field(colOut).getValue();; int128_t valOut = fRow.getTSInt128Field(colOut).getValue();;
int128_t sum = valOut + *dec; int128_t sum = valOut + wideValue;
fRow.setBinaryField(&sum, colOut); fRow.setInt128Field(sum, colOut);
fRow.setUintField(rowIn.getUintField(colAuxIn) + cnt, colAux); fRow.setUintField(rowIn.getUintField(colAuxIn) + cnt, colAux);
} }
else else
{ {
fRow.setBinaryField(dec, colOut); fRow.setInt128Field(wideValue, colOut);
fRow.setUintField(rowIn.getUintField(colAuxIn), colAux); fRow.setUintField(rowIn.getUintField(colAuxIn), colAux);
} }
} }

View File

@ -559,7 +559,7 @@ class RowAggregation : public messageqcpp::Serializeable
copyRow(fNullRow, &row); copyRow(fNullRow, &row);
} }
inline void updateIntMinMax(int128_t* val1, int128_t* val2, int64_t col, int func); inline void updateIntMinMax(int128_t val1, int128_t val2, int64_t col, int func);
inline void updateIntMinMax(int64_t val1, int64_t val2, int64_t col, int func); inline void updateIntMinMax(int64_t val1, int64_t val2, int64_t col, int func);
inline void updateUintMinMax(uint64_t val1, uint64_t val2, int64_t col, int func); inline void updateUintMinMax(uint64_t val1, uint64_t val2, int64_t col, int func);
inline void updateCharMinMax(uint64_t val1, uint64_t val2, int64_t col, int func); inline void updateCharMinMax(uint64_t val1, uint64_t val2, int64_t col, int func);

View File

@ -589,7 +589,7 @@ string Row::toString(uint32_t rownum) const
case CalpontSystemCatalog::UDECIMAL: case CalpontSystemCatalog::UDECIMAL:
if (colWidths[i] == datatypes::MAXDECIMALWIDTH) if (colWidths[i] == datatypes::MAXDECIMALWIDTH)
{ {
datatypes::Decimal dec(0, scale[i], precision[i], getTSInt128Field(i).getValPtr()); datatypes::Decimal dec(getTSInt128Field(i), scale[i], precision[i]);
os << dec << " "; os << dec << " ";
break; break;
} }
@ -1456,7 +1456,7 @@ void applyMapping(const int* mapping, const Row& in, Row* out)
// Migrate to offset based methods here // Migrate to offset based methods here
// code precision 2 width convertor // code precision 2 width convertor
else if (UNLIKELY(datatypes::isWideDecimalType(in.getColTypes()[i], in.getColumnWidth(i)))) else if (UNLIKELY(datatypes::isWideDecimalType(in.getColTypes()[i], in.getColumnWidth(i))))
out->setBinaryField_offset(in.getTSInt128Field(i).getValPtr(), 16, out->getOffset(mapping[i])); out->setInt128Field(in.getTSInt128Field(i).getValue(), mapping[i]);
else if (in.isUnsigned(i)) else if (in.isUnsigned(i))
out->setUintField(in.getUintField(i), mapping[i]); out->setUintField(in.getUintField(i), mapping[i]);
else else

View File

@ -442,8 +442,7 @@ class Row
inline datatypes::Decimal getDecimalField(uint32_t colIndex) const inline datatypes::Decimal getDecimalField(uint32_t colIndex) const
{ {
if (LIKELY(getColumnWidth(colIndex) == datatypes::MAXDECIMALWIDTH)) if (LIKELY(getColumnWidth(colIndex) == datatypes::MAXDECIMALWIDTH))
return datatypes::Decimal(0, (int)getScale(colIndex), getPrecision(colIndex), return datatypes::Decimal(getTSInt128Field(colIndex), (int)getScale(colIndex), getPrecision(colIndex));
getTSInt128Field(colIndex).getValPtr());
return datatypes::Decimal(datatypes::TSInt64(getIntField(colIndex)), (int)getScale(colIndex), return datatypes::Decimal(datatypes::TSInt64(getIntField(colIndex)), (int)getScale(colIndex),
getPrecision(colIndex)); getPrecision(colIndex));
} }
@ -515,11 +514,6 @@ class Row
inline const uint8_t* getVarBinaryField(uint32_t colIndex) const; inline const uint8_t* getVarBinaryField(uint32_t colIndex) const;
inline const uint8_t* getVarBinaryField(uint32_t& len, uint32_t colIndex) const; inline const uint8_t* getVarBinaryField(uint32_t& len, uint32_t colIndex) const;
inline void setVarBinaryField(const uint8_t* val, uint32_t len, uint32_t colIndex); inline void setVarBinaryField(const uint8_t* val, uint32_t len, uint32_t colIndex);
template <typename T>
inline T* getBinaryField_offset(uint32_t offset) const;
inline boost::shared_ptr<mcsv1sdk::UserData> getUserData(uint32_t colIndex) const; inline boost::shared_ptr<mcsv1sdk::UserData> getUserData(uint32_t colIndex) const;
inline void setUserData(mcsv1sdk::mcsv1Context& context, boost::shared_ptr<mcsv1sdk::UserData> userData, inline void setUserData(mcsv1sdk::mcsv1Context& context, boost::shared_ptr<mcsv1sdk::UserData> userData,
uint32_t len, uint32_t colIndex); uint32_t len, uint32_t colIndex);
@ -1014,13 +1008,6 @@ inline void Row::setStringField(const utils::ConstString& str, uint32_t colIndex
} }
} }
template <typename T>
inline T* Row::getBinaryField_offset(uint32_t offset) const
{
return reinterpret_cast<T*>(&data[offset]);
}
inline std::string Row::getVarBinaryStringField(uint32_t colIndex) const inline std::string Row::getVarBinaryStringField(uint32_t colIndex) const
{ {
if (inStringTable(colIndex)) if (inStringTable(colIndex))
@ -1346,7 +1333,7 @@ inline void Row::copyField(Row& out, uint32_t destIndex, uint32_t srcIndex) cons
inline void Row::copyBinaryField(Row& out, uint32_t destIndex, uint32_t srcIndex) const inline void Row::copyBinaryField(Row& out, uint32_t destIndex, uint32_t srcIndex) const
{ {
out.setBinaryField(getTSInt128Field(srcIndex).getValPtr(), destIndex); out.setInt128Field(getTSInt128Field(srcIndex).getValue(), destIndex);
} }
inline void Row::setRid(uint64_t rid) inline void Row::setRid(uint64_t rid)

View File

@ -526,7 +526,7 @@ void WindowFunctionType::implicit2T(uint64_t i, T& t, int s)
} }
else if (width == datatypes::MAXDECIMALWIDTH) else if (width == datatypes::MAXDECIMALWIDTH)
{ {
datatypes::TSInt128::assignPtrPtr(&t, fRow.getTSInt128Field(i).getValPtr()); t = fRow.getTSInt128Field(i).getValue();
} }
break; break;
} }

View File

@ -3111,9 +3111,8 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs, std::strin
{ {
if (fetchColColwidths[fetchColPos] == datatypes::MAXDECIMALWIDTH) if (fetchColColwidths[fetchColPos] == datatypes::MAXDECIMALWIDTH)
{ {
datatypes::Decimal dec(0, fetchColScales[fetchColPos], datatypes::Decimal dec(row.getTSInt128Field(fetchColPos), fetchColScales[fetchColPos],
rowGroups[txnId]->getPrecision()[fetchColPos], rowGroups[txnId]->getPrecision()[fetchColPos]);
row.getTSInt128Field(fetchColPos).getValPtr());
value = dec.toString(true); value = dec.toString(true);
break; break;
} }
@ -3466,9 +3465,8 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs, std::strin
{ {
if (fetchColColwidths[fetchColPos] == datatypes::MAXDECIMALWIDTH) if (fetchColColwidths[fetchColPos] == datatypes::MAXDECIMALWIDTH)
{ {
datatypes::Decimal dec(0, fetchColScales[fetchColPos], datatypes::Decimal dec(row.getTSInt128Field(fetchColPos), fetchColScales[fetchColPos],
rowGroups[txnId]->getPrecision()[fetchColPos], rowGroups[txnId]->getPrecision()[fetchColPos]);
row.getTSInt128Field(fetchColPos).getValPtr());
value = dec.toString(true); value = dec.toString(true);
break; break;
} }