From d1603696eb812d625a672865fba00e3557f99c96 Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 14 Sep 2016 17:10:23 -0500 Subject: [PATCH] MCOl-297 CHARACTER_LENGTH(datetime) returns wrong length --- utils/funcexp/func_char_length.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/funcexp/func_char_length.cpp b/utils/funcexp/func_char_length.cpp index 73f987f1b..22c576bc4 100644 --- a/utils/funcexp/func_char_length.cpp +++ b/utils/funcexp/func_char_length.cpp @@ -96,8 +96,7 @@ int64_t Func_char_length::getIntVal(rowgroup::Row& row, case execplan::CalpontSystemCatalog::DATETIME: { string date = dataconvert::DataConvert::datetimeToString(parm[0]->data()->getDatetimeIntVal(row, isNull)); - //adjust for microseconds not counted - return (int64_t)date.size() - 7; + return (int64_t)date.size(); } default: