```
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```
using FunctionPtr = std::shared_ptr<IFunction>;
/** Class that represents single value with possible infinities.
  * Single field is stored in column for more optimal inplace comparisons with other regular columns.
  * Extracting fields from columns and further their comparison is suboptimal and requires extra copying.
  */
class ValueWithInfinity
{
public:
    enum Type
    {
        MINUS_INFINITY = -1,
        NORMAL = 0,
        PLUS_INFINITY = 1
    };
    ValueWithInfinity(MutableColumnPtr && column_)
        : column(std::move(column_)), type(NORMAL) {}
    void update(const Field & x);
    void update(Type type_) { type = type_; }
    const IColumn & getColumnIfFinite() const;
    Type getType() const { return type; }
private:
    MutableColumnPtr column;
    Type type;
};
class MergeTreeSetIndex