1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

Merge pull request #1630 from benthompson15/MCOL-4323-dev

MCOL-4323: Encode / Decode - dev
This commit is contained in:
David.Hall
2020-12-01 13:54:19 -06:00
committed by GitHub
9 changed files with 320 additions and 4 deletions

View File

@@ -42,6 +42,7 @@ using namespace boost;
#include "funcexp.h"
#include "functor_export.h"
#include "functor_str.h"
using namespace funcexp;
#ifdef _MSC_VER
@@ -97,7 +98,10 @@ FunctionColumn::FunctionColumn( const FunctionColumn& rhs, const uint32_t sessio
}
FunctionColumn::~FunctionColumn()
{}
{
if (fDynamicFunctor)
delete fDynamicFunctor;
}
/**
* Methods
@@ -306,9 +310,16 @@ void FunctionColumn::unserialize(messageqcpp::ByteStream& b)
// @bug 3506. Special treatment for rand() function. reset the seed
Func_rand* rand = dynamic_cast<Func_rand*>(fFunctor);
if (rand)
rand->seedSet(false);
fFunctor = fDynamicFunctor = new Func_rand();
Func_encode* encode = dynamic_cast<Func_encode*>(fFunctor);
if (encode)
fFunctor = fDynamicFunctor = new Func_encode();
Func_decode* decode = dynamic_cast<Func_decode*>(fFunctor);
if (decode)
fFunctor = fDynamicFunctor = new Func_decode();
}
bool FunctionColumn::operator==(const FunctionColumn& t) const

View File

@@ -314,6 +314,7 @@ public:
private:
funcexp::FunctionParm fFunctionParms;
funcexp::Func* fFunctor; /// functor to execute this function
funcexp::Func* fDynamicFunctor = NULL; // for rand encode decode
};
/**