Mapping a NUMERIC or DECIMAL with no fractional digits to Int32 will lead to issues (exception) if an actual number stored in the column does not fit into a 32-bit integer. The method should check the size of the type, and if its > 9, map to Int64 instead.
Fix:
case SQL_NUMERIC:
case SQL_DECIMAL:
if (0 == _columnDesc.decimalDigits)
{
if (_columnDesc.size > 9)
setType(MetaColumn::FDT_INT64);
else
setType(MetaColumn::FDT_INT32);
}
else
{
setType(MetaColumn::FDT_DOUBLE);
}
break;
Mapping a NUMERIC or DECIMAL with no fractional digits to Int32 will lead to issues (exception) if an actual number stored in the column does not fit into a 32-bit integer. The method should check the size of the type, and if its > 9, map to Int64 instead.
Fix: