diff --git a/utils/funcexp/func_rand.cpp b/utils/funcexp/func_rand.cpp index c02137568..f0400eb79 100644 --- a/utils/funcexp/func_rand.cpp +++ b/utils/funcexp/func_rand.cpp @@ -77,7 +77,7 @@ double Func_rand::getDoubleVal(rowgroup::Row& row, fSeedSet = false; fSeedIndex += 1; } - else if (fFirstRow == 0) + else if (fFirstRow == nullptr) { // Store first row fFirstRow = row.getData(); diff --git a/utils/funcexp/functor_export.h b/utils/funcexp/functor_export.h index ad885296e..a59a37c3d 100644 --- a/utils/funcexp/functor_export.h +++ b/utils/funcexp/functor_export.h @@ -38,7 +38,7 @@ namespace funcexp class Func_rand : public Func { public: - Func_rand() : Func("rand"), fSeed1(0), fSeed2(0), fSeedSet(false), fMultipleSeedsSet(false), fFirstRow(nullptr){} + Func_rand() : Func("rand"), fSeed1(0), fSeed2(0), fSeedSet(false), fMultipleSeedsSet(false), fFirstRow(nullptr), fSeeds(){} virtual ~Func_rand() {} double getRand(); @@ -46,7 +46,6 @@ public: { fSeedSet = seedSet; fMultipleSeedsSet = seedSet; - fFirstRow = nullptr; } execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);