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-1052 Remove unused symbols.
This commit is contained in:
@ -276,104 +276,6 @@ void storeNumericField(Field** f, int64_t value, CalpontSystemCatalog::ColType&
|
||||
}
|
||||
}
|
||||
|
||||
void storeNumericFieldGroupBy(Field** f, int64_t value, CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
// unset null bit first
|
||||
if ((*f)->null_ptr)
|
||||
*(*f)->null_ptr &= ~(*f)->null_bit;
|
||||
|
||||
// For unsigned, use the ColType returned in the row rather than the
|
||||
// unsigned_flag set by mysql. This is because mysql gets it wrong for SUM()
|
||||
// Hopefully, in all other cases we get it right.
|
||||
switch ((*f)->type())
|
||||
{
|
||||
case MYSQL_TYPE_NEWDECIMAL:
|
||||
{
|
||||
Field_new_decimal* f2 = (Field_new_decimal*)*f;
|
||||
|
||||
// @bug4388 stick to InfiniDB's scale in case mysql gives wrong scale due
|
||||
// to create vtable limitation.
|
||||
if (f2->dec < ct.scale)
|
||||
f2->dec = ct.scale;
|
||||
|
||||
char buf[256];
|
||||
dataconvert::DataConvert::decimalToString(value, (unsigned)ct.scale, buf, 256, ct.colDataType);
|
||||
f2->store(buf, strlen(buf), f2->charset());
|
||||
break;
|
||||
}
|
||||
|
||||
case MYSQL_TYPE_TINY: //TINYINT type
|
||||
{
|
||||
Field_tiny* f2 = (Field_tiny*)*f;
|
||||
longlong int_val = (longlong)value;
|
||||
f2->store(int_val, f2->unsigned_flag);
|
||||
break;
|
||||
}
|
||||
|
||||
case MYSQL_TYPE_SHORT: //SMALLINT type
|
||||
{
|
||||
Field_short* f2 = (Field_short*)*f;
|
||||
longlong int_val = (longlong)value;
|
||||
f2->store(int_val, f2->unsigned_flag);
|
||||
break;
|
||||
}
|
||||
|
||||
case MYSQL_TYPE_LONG: //INT type
|
||||
{
|
||||
Field_long* f2 = (Field_long*)*f;
|
||||
longlong int_val = (longlong)value;
|
||||
f2->store(int_val, f2->unsigned_flag);
|
||||
break;
|
||||
}
|
||||
|
||||
case MYSQL_TYPE_LONGLONG: //BIGINT type
|
||||
{
|
||||
Field_longlong* f2 = (Field_longlong*)*f;
|
||||
longlong int_val = (longlong)value;
|
||||
f2->store(int_val, f2->unsigned_flag);
|
||||
break;
|
||||
}
|
||||
|
||||
case MYSQL_TYPE_FLOAT: // FLOAT type
|
||||
{
|
||||
Field_float* f2 = (Field_float*)*f;
|
||||
float float_val = *(float*)(&value);
|
||||
f2->store(float_val);
|
||||
break;
|
||||
}
|
||||
|
||||
case MYSQL_TYPE_DOUBLE: // DOUBLE type
|
||||
{
|
||||
Field_double* f2 = (Field_double*)*f;
|
||||
double double_val = *(double*)(&value);
|
||||
f2->store(double_val);
|
||||
break;
|
||||
}
|
||||
|
||||
case MYSQL_TYPE_VARCHAR:
|
||||
{
|
||||
Field_varstring* f2 = (Field_varstring*)*f;
|
||||
char tmp[25];
|
||||
|
||||
if (ct.colDataType == CalpontSystemCatalog::DECIMAL)
|
||||
dataconvert::DataConvert::decimalToString(value, (unsigned)ct.scale, tmp, 25, ct.colDataType);
|
||||
else
|
||||
snprintf(tmp, 25, "%ld", value);
|
||||
|
||||
f2->store(tmp, strlen(tmp), f2->charset());
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
Field_longlong* f2 = (Field_longlong*)*f;
|
||||
longlong int_val = (longlong)value;
|
||||
f2->store(int_val, f2->unsigned_flag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// @bug 2244. Log exception related to lost connection to ExeMgr.
|
||||
// Log exception error from calls to sm::tpl_scan_fetch in fetchNextRow()
|
||||
|
Reference in New Issue
Block a user