diff --git a/src/Interpreters/Aggregator.h b/src/Interpreters/Aggregator.h index c81cfa2c0a2..7dec8c9c8a4 100644 --- a/src/Interpreters/Aggregator.h +++ b/src/Interpreters/Aggregator.h @@ -209,7 +209,8 @@ struct AggregationMethodOneNumber // Insert the key from the hash table into columns. static void insertKeyIntoColumns(const Key & key, std::vector & key_columns, const Sizes & /*key_sizes*/) { - const auto * key_holder = reinterpret_cast(&key); + FieldType casted_key = static_cast(key); + const auto * key_holder = reinterpret_cast(&casted_key); auto * column = static_cast(key_columns[0]); column->insertRawData(key_holder); }