mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 17:50:47 +00:00
Enabling -Wshadow [#CLICKHOUSE-2]
This commit is contained in:
parent
a3cd1ea8cb
commit
74fee0dc98
@ -366,28 +366,28 @@ void ColumnNullable::getExtremes(Field & min, Field & max) const
|
|||||||
min = Null();
|
min = Null();
|
||||||
max = Null();
|
max = Null();
|
||||||
|
|
||||||
const auto & null_map = getNullMapData();
|
const auto & null_map_data = getNullMapData();
|
||||||
|
|
||||||
if (const auto col = typeid_cast<const ColumnInt8 *>(nested_column.get()))
|
if (const auto col_i8 = typeid_cast<const ColumnInt8 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<Int8>(*col, null_map, min, max);
|
getExtremesFromNullableContent<Int8>(*col_i8, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnInt16 *>(nested_column.get()))
|
else if (const auto col_i16 = typeid_cast<const ColumnInt16 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<Int16>(*col, null_map, min, max);
|
getExtremesFromNullableContent<Int16>(*col_i16, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnInt32 *>(nested_column.get()))
|
else if (const auto col_i32 = typeid_cast<const ColumnInt32 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<Int32>(*col, null_map, min, max);
|
getExtremesFromNullableContent<Int32>(*col_i32, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnInt64 *>(nested_column.get()))
|
else if (const auto col_i64 = typeid_cast<const ColumnInt64 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<Int64>(*col, null_map, min, max);
|
getExtremesFromNullableContent<Int64>(*col_i64, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnUInt8 *>(nested_column.get()))
|
else if (const auto col_u8 = typeid_cast<const ColumnUInt8 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<UInt8>(*col, null_map, min, max);
|
getExtremesFromNullableContent<UInt8>(*col_u8, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnUInt16 *>(nested_column.get()))
|
else if (const auto col_u16 = typeid_cast<const ColumnUInt16 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<UInt16>(*col, null_map, min, max);
|
getExtremesFromNullableContent<UInt16>(*col_u16, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnUInt32 *>(nested_column.get()))
|
else if (const auto col_u32 = typeid_cast<const ColumnUInt32 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<UInt32>(*col, null_map, min, max);
|
getExtremesFromNullableContent<UInt32>(*col_u32, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnUInt64 *>(nested_column.get()))
|
else if (const auto col_u64 = typeid_cast<const ColumnUInt64 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<UInt64>(*col, null_map, min, max);
|
getExtremesFromNullableContent<UInt64>(*col_u64, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnFloat32 *>(nested_column.get()))
|
else if (const auto col_f32 = typeid_cast<const ColumnFloat32 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<Float32>(*col, null_map, min, max);
|
getExtremesFromNullableContent<Float32>(*col_f32, null_map_data, min, max);
|
||||||
else if (const auto col = typeid_cast<const ColumnFloat64 *>(nested_column.get()))
|
else if (const auto col_f64 = typeid_cast<const ColumnFloat64 *>(nested_column.get()))
|
||||||
getExtremesFromNullableContent<Float64>(*col, null_map, min, max);
|
getExtremesFromNullableContent<Float64>(*col_f64, null_map_data, min, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ void NO_INLINE Aggregator::executeImplCase(
|
|||||||
bool overflow = false; /// The new key did not fit in the hash table because of no_more_keys.
|
bool overflow = false; /// The new key did not fit in the hash table because of no_more_keys.
|
||||||
|
|
||||||
/// Get the key to insert into the hash table.
|
/// Get the key to insert into the hash table.
|
||||||
typename Method::Key key = state.getKey(key_columns, params.keys_size, i, keys, *aggregates_pool);
|
typename Method::Key key = state.getKey(key_columns, params.keys_size, i, key_sizes, keys, *aggregates_pool);
|
||||||
|
|
||||||
if (!no_more_keys) /// Insert.
|
if (!no_more_keys) /// Insert.
|
||||||
{
|
{
|
||||||
@ -1074,7 +1074,7 @@ void NO_INLINE Aggregator::convertToBlockImplFinal(
|
|||||||
{
|
{
|
||||||
for (const auto & value : data)
|
for (const auto & value : data)
|
||||||
{
|
{
|
||||||
method.insertKeyIntoColumns(value, key_columns, params.keys_size);
|
method.insertKeyIntoColumns(value, key_columns, params.keys_size, key_sizes);
|
||||||
|
|
||||||
for (size_t i = 0; i < params.aggregates_size; ++i)
|
for (size_t i = 0; i < params.aggregates_size; ++i)
|
||||||
aggregate_functions[i]->insertResultInto(
|
aggregate_functions[i]->insertResultInto(
|
||||||
@ -1095,7 +1095,7 @@ void NO_INLINE Aggregator::convertToBlockImplNotFinal(
|
|||||||
|
|
||||||
for (auto & value : data)
|
for (auto & value : data)
|
||||||
{
|
{
|
||||||
method.insertKeyIntoColumns(value, key_columns, params.keys_size);
|
method.insertKeyIntoColumns(value, key_columns, params.keys_size, key_sizes);
|
||||||
|
|
||||||
/// reserved, so push_back does not throw exceptions
|
/// reserved, so push_back does not throw exceptions
|
||||||
for (size_t i = 0; i < params.aggregates_size; ++i)
|
for (size_t i = 0; i < params.aggregates_size; ++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user