mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Try a different approach
This commit is contained in:
parent
9d8290cc50
commit
8e5cd5e6b0
@ -492,10 +492,11 @@ Field convertFieldToTypeImpl(const Field & src, const IDataType & type, const ID
|
||||
if (src.getType() == Field::Types::String)
|
||||
{
|
||||
/// Promote data type to avoid overflows. Note that overflows in the largest data type are still possible.
|
||||
/// But don't promote Float32, since we want to keep the exact same value
|
||||
const IDataType * type_to_parse = &type;
|
||||
DataTypePtr holder;
|
||||
|
||||
if (type.canBePromoted())
|
||||
if (type.canBePromoted() && !which_type.isFloat32())
|
||||
{
|
||||
holder = type.promoteNumericType();
|
||||
type_to_parse = holder.get();
|
||||
|
Loading…
Reference in New Issue
Block a user