mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 12:32:04 +00:00
Better
This commit is contained in:
parent
6f0c0252f0
commit
1f3d75cbf2
@ -98,14 +98,14 @@ namespace
|
|||||||
void transformIntegersAndFloatsToFloats(DataTypes & data_types, TypeIndexesSet & type_indexes)
|
void transformIntegersAndFloatsToFloats(DataTypes & data_types, TypeIndexesSet & type_indexes)
|
||||||
{
|
{
|
||||||
bool have_floats = type_indexes.contains(TypeIndex::Float64);
|
bool have_floats = type_indexes.contains(TypeIndex::Float64);
|
||||||
bool have_integers = type_indexes.contains(TypeIndex::Int64) || type_indexes.contains(TypeIndex::UInt64);
|
bool have_integers = type_indexes.contains(TypeIndex::Int64) || type_indexes.contains(TypeIndex::UInt64);
|
||||||
if (!have_integers || !have_floats)
|
if (!have_integers || !have_floats)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (auto & type : data_types)
|
for (auto & type : data_types)
|
||||||
{
|
{
|
||||||
WhichDataType which(type);
|
WhichDataType which(type);
|
||||||
if (which.isFloat64() || which.isInt64() || which.isUInt64())
|
if (which.isInt64() || which.isUInt64())
|
||||||
type = std::make_shared<DataTypeFloat64>();
|
type = std::make_shared<DataTypeFloat64>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user