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

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

View File

@ -372,7 +372,6 @@ class ReturnedColumn : public TreeNode
protected:
std::string fErrMsg; /// error occured in evaluation
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 fExpressionId; /// unique id for this expression
};

View File

@ -489,12 +489,6 @@ bool SimpleColumn::singleTable(CalpontSystemCatalog::TableAliasName& tan)
// @todo move to inline
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);
if (isNull2)
@ -632,8 +626,7 @@ void SimpleColumn::evaluate(Row& row, bool& isNull)
{
case 16:
{
datatypes::TSInt128::assignPtrPtr(&fResult.decimalVal.s128Value,
row.getBinaryField_offset<int128_t>(fInputOffset));
fResult.decimalVal.s128Value = row.getTSInt128Field(fInputIndex).getValue();
break;
}
case 1: