From 791ff2bea42cd5854ab44788d061f8ecdc7bb2f2 Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 19 Aug 2020 14:35:09 -0500 Subject: [PATCH] MCOL-4236 DATE is still returned as INT --- utils/funcexp/func_ceil.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/funcexp/func_ceil.cpp b/utils/funcexp/func_ceil.cpp index b41a0b93e..967989c74 100644 --- a/utils/funcexp/func_ceil.cpp +++ b/utils/funcexp/func_ceil.cpp @@ -143,7 +143,12 @@ int64_t Func_ceil::getIntVal(Row& row, case CalpontSystemCatalog::DATE: { - ret = parm[0]->data()->getDateIntVal(row, isNull); + // For some reason, MDB doesn't return this as a date, + // but datetime is returned as a datetime. Expect + // this to change in the future. + Date d (parm[0]->data()->getDateIntVal(row, isNull)); + if (!isNull) + ret = d.convertToMySQLint(); } break;