```
select count() from numbers(10) where number in tuple(1, 2, 3, 4, 5) settings max_temporary_columns = 3

Received exception from server (version 20.7.1):
Code: 165. DB::Exception: Received from localhost:9000. DB::Exception: Too many temporary columns: _dummy, 1, 2, 3. Maximum: 3. 
```

Workaround: Avoid function in tuple.
```select count() from numbers(10) where number in (1, 2, 3, 4, 5) settings max_temporary_columns = 3```
{
    std::unique_lock lock(rwlock);
    if (!empty())
        return;
    keys_size = header.columns();
    ColumnRawPtrs key_columns;
    key_columns.reserve(keys_size);
    data_types.reserve(keys_size);
    set_elements_types.reserve(keys_size);
    
    Columns materialized_columns;
    
    for (size_t i = 0; i < keys_size; ++i)
    {
        materialized_columns.emplace_back(header.safeGetByPosition(i).column->convertToFullColumnIfConst());
        key_columns.emplace_back(materialized_columns.back().get());
        data_types.emplace_back(header.safeGetByPosition(i).type);
        set_elements_types.emplace_back(header.safeGetByPosition(i).type);
        
        if (const auto * low_cardinality_type = typeid_cast<const DataTypeLowCardinality *>(data_types.back().get()))
        {
            data_types.back() = low_cardinality_type->getDictionaryType();
            materialized_columns.emplace_back(key_columns.back()->convertToFullColumnIfLowCardinality());
            key_columns.back() = materialized_columns.back().get();
        }
    }
    
    ConstNullMapPtr null_map{};