From 2c36eedb2bf406220d311e7f12b60b0e8d3fff0d Mon Sep 17 00:00:00 2001 From: Roman Nozdrin Date: Tue, 22 Dec 2020 15:53:06 +0000 Subject: [PATCH] MCOL-4466 regr_count() and distinct_count() now use long long for counters and for a type cast to/from boost::any --- utils/regr/regr_count.cpp | 2 +- utils/udfsdk/distinct_count.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/regr/regr_count.cpp b/utils/regr/regr_count.cpp index 7d893e16f..eeb5e09a2 100644 --- a/utils/regr/regr_count.cpp +++ b/utils/regr/regr_count.cpp @@ -38,7 +38,7 @@ static Add_regr_count_ToUDAFMap addToMap; // Use the simple data model struct regr_count_data { - uint64_t cnt; + long long cnt; }; diff --git a/utils/udfsdk/distinct_count.cpp b/utils/udfsdk/distinct_count.cpp index e622bf324..b0a7c15bc 100644 --- a/utils/udfsdk/distinct_count.cpp +++ b/utils/udfsdk/distinct_count.cpp @@ -22,7 +22,7 @@ using namespace mcsv1sdk; struct distinct_count_data { - uint64_t cnt; + long long cnt; }; #define OUT_TYPE int64_t @@ -34,7 +34,7 @@ mcsv1_UDAF::ReturnCode distinct_count::init(mcsv1Context* context, { // The error message will be prepended with // "The storage engine for the table doesn't support " - context->setErrorMessage("avgx() with other than 1 arguments"); + context->setErrorMessage("distinct_count() with other than 1 arguments"); return mcsv1_UDAF::ERROR; } context->setResultType(execplan::CalpontSystemCatalog::BIGINT);