Code simplification

This commit is contained in:
Alexey Milovidov 2022-09-18 08:58:32 +02:00
parent 3c43d6516b
commit c41e37fa8e
2 changed files with 2 additions and 17 deletions

View File

@ -1167,20 +1167,8 @@ private:
if (key.isNull())
continue;
// Field may be of Float type, but for the purpose of bitwise
// equality we can treat them as UInt64, hence the reinterpret().
if (to[0].getType() == Field::Types::Decimal32)
{
table[key.get<Decimal32>().getValue()] = (*used_to)[i].get<Decimal32>().getValue();
}
else if (to[0].getType() == Field::Types::Decimal64)
{
table[key.get<Decimal64>().getValue()] = (*used_to)[i].get<Decimal64>().getValue();
}
else
{
table[bitCastToUInt64(key)] = bitCastToUInt64((*used_to)[i]);
}
/// Field may be of Float type, but for the purpose of bitwise equality we can treat them as UInt64
table[bitCastToUInt64(key)] = bitCastToUInt64((*used_to)[i]);
}
}
else

View File

@ -6,12 +6,9 @@
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/DataTypeTuple.h>
#include <DataTypes/DataTypeMap.h>
#include <DataTypes/DataTypeObject.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypesDecimal.h>
#include <DataTypes/DataTypeString.h>
#include <DataTypes/DataTypeFixedString.h>
#include <DataTypes/DataTypeDate.h>
#include <DataTypes/DataTypeDateTime.h>
#include <DataTypes/DataTypeDateTime64.h>
#include <DataTypes/DataTypeEnum.h>