From c766620d22a08ca6868140b902e1fbd5a0133121 Mon Sep 17 00:00:00 2001 From: Gagan Goel Date: Fri, 6 Sep 2019 21:47:24 -0400 Subject: [PATCH] Add support for DateTime data type in ROUND() --- utils/funcexp/func_round.cpp | 9 +++++++++ utils/funcexp/functor_real.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/utils/funcexp/func_round.cpp b/utils/funcexp/func_round.cpp index 805f87e56..293f94021 100644 --- a/utils/funcexp/func_round.cpp +++ b/utils/funcexp/func_round.cpp @@ -628,5 +628,14 @@ string Func_round::getStrVal(Row& row, } +int64_t Func_round::getDatetimeIntVal(Row& row, + FunctionParm& parm, + bool& isNull, + CalpontSystemCatalog::ColType& op_ct) +{ + return parm[0]->data()->getIntVal(row, isNull); +} + + } // namespace funcexp // vim:ts=4 sw=4: diff --git a/utils/funcexp/functor_real.h b/utils/funcexp/functor_real.h index 717e2208e..0f5137891 100644 --- a/utils/funcexp/functor_real.h +++ b/utils/funcexp/functor_real.h @@ -197,6 +197,11 @@ public: FunctionParm& fp, bool& isNull, execplan::CalpontSystemCatalog::ColType& op_ct); + + int64_t getDatetimeIntVal(rowgroup::Row& row, + FunctionParm& fp, + bool& isNull, + execplan::CalpontSystemCatalog::ColType& op_ct); };