1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-1822 Intermediate checkin. DISTINCT not working.

This commit is contained in:
David Hall
2019-02-25 14:54:46 -06:00
parent ab931e7c51
commit a2aa4b8479
67 changed files with 2391 additions and 1018 deletions

View File

@ -1523,6 +1523,26 @@ string Func_format::getStrVal(Row& row,
}
break;
case execplan::CalpontSystemCatalog::LONGDOUBLE:
{
long double rawValue = parm[0]->data()->getLongDoubleVal(row, isNull);
// roundup
if (scale < 0) scale = 0;
if (rawValue >= 0)
rawValue += 0.5 / pow(10.0, scale);
else
rawValue -= 0.5 / pow(10.0, scale);
// double's can be *really* long to print out. Max mysql
// is e308 so allow for 308 + 36 decimal places minimum.
char buf[384];
snprintf(buf, 384, "%0.36Lf", rawValue);
value = buf;
}
break;
default:
{
std::ostringstream oss;