You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-3760 + Fix multiple rands in statement with or without ORDER BY
This commit is contained in:
@ -26,6 +26,8 @@
|
||||
|
||||
#include "functor.h"
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace funcexp
|
||||
{
|
||||
@ -36,13 +38,15 @@ namespace funcexp
|
||||
class Func_rand : public Func
|
||||
{
|
||||
public:
|
||||
Func_rand() : Func("rand"), fSeed1(0), fSeed2(0), fSeedSet(false) {}
|
||||
Func_rand() : Func("rand"), fSeed1(0), fSeed2(0), fSeedSet(false), fMultipleSeedsSet(false), fFirstRow(nullptr){}
|
||||
virtual ~Func_rand() {}
|
||||
|
||||
double getRand();
|
||||
void seedSet(bool seedSet)
|
||||
{
|
||||
fSeedSet = seedSet;
|
||||
fMultipleSeedsSet = seedSet;
|
||||
fFirstRow = nullptr;
|
||||
}
|
||||
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
|
||||
|
||||
@ -79,6 +83,10 @@ private:
|
||||
uint64_t fSeed1;
|
||||
uint64_t fSeed2;
|
||||
bool fSeedSet;
|
||||
bool fMultipleSeedsSet;
|
||||
uint8_t* fFirstRow;
|
||||
uint16_t fSeedIndex;
|
||||
std::vector<std::pair<uint64_t, uint64_t> > fSeeds;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user