You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-1822 add LONG DOUBLE support
This commit is contained in:
@ -703,6 +703,41 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
|
||||
//break;
|
||||
}
|
||||
|
||||
case CalpontSystemCatalog::LONGDOUBLE:
|
||||
{
|
||||
double dl = row.getLongDoubleField(s);
|
||||
|
||||
if (dl == std::numeric_limits<long double>::infinity())
|
||||
continue;
|
||||
|
||||
Field_double* f2 = (Field_double*)*f;
|
||||
// bug 3483, reserve enough space for the longest double value
|
||||
// -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and
|
||||
// 2.2250738585072014E-308 to 1.7976931348623157E+308.
|
||||
(*f)->field_length = 310;
|
||||
|
||||
//double double_val = *(double*)(&value);
|
||||
//f2->store(double_val);
|
||||
if ((f2->decimals() == DECIMAL_NOT_SPECIFIED && row.getScale(s) > 0)
|
||||
|| f2->decimals() < row.getScale(s))
|
||||
{
|
||||
f2->dec = row.getScale(s);
|
||||
}
|
||||
|
||||
f2->store(dl);
|
||||
|
||||
if ((*f)->null_ptr)
|
||||
*(*f)->null_ptr &= ~(*f)->null_bit;
|
||||
|
||||
break;
|
||||
|
||||
|
||||
//int64_t* icvp = (int64_t*)&dl;
|
||||
//intColVal = *icvp;
|
||||
//storeNumericField(f, intColVal, colType);
|
||||
//break;
|
||||
}
|
||||
|
||||
case CalpontSystemCatalog::DECIMAL:
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
{
|
||||
|
Reference in New Issue
Block a user