```
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```
: indexes_mapping(std::move(index_mapping_))
{
    std::sort(indexes_mapping.begin(), indexes_mapping.end(),
        [](const KeyTuplePositionMapping & l, const KeyTuplePositionMapping & r)
        {
            return std::forward_as_tuple(l.key_index, l.tuple_index) < std::forward_as_tuple(r.key_index, r.tuple_index);
        });
    indexes_mapping.erase(std::unique(
        indexes_mapping.begin(), indexes_mapping.end(),
        [](const KeyTuplePositionMapping & l, const KeyTuplePositionMapping & r)
        {
            return l.key_index == r.key_index;
        }), indexes_mapping.end());
    size_t tuple_size = indexes_mapping.size();
    ordered_set.resize(tuple_size);
    for (size_t i = 0; i < tuple_size; ++i)
        ordered_set[i] = set_elements[indexes_mapping[i].tuple_index];
    Block block_to_sort;
    SortDescription sort_description;
    for (size_t i = 0; i < tuple_size; ++i)
    {
        block_to_sort.insert({ ordered_set[i], nullptr, "" });
        sort_description.emplace_back(i, 1, 1);
    }
    sortBlock(block_to_sort, sort_description);
    for (size_t i = 0; i < tuple_size; ++i)
        ordered_set[i] = block_to_sort.getByPosition(i).column;
}
/** Return the BoolMask where:
  * 1: the intersection of the set and the range is non-empty