```
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```
set_element_types = left_tuple_type->getElements();
    for (auto & element_type : set_element_types)
        if (const auto * low_cardinality_type = typeid_cast<const DataTypeLowCardinality *>(element_type.get()))
            element_type = low_cardinality_type->getDictionaryType();
    auto set_key = PreparedSetKey::forLiteral(*right_arg, set_element_types);
    if (prepared_sets.count(set_key))
        return prepared_sets.at(set_key); 
    auto [right_arg_value, right_arg_type] = evaluateConstantExpression(right_arg, context);
    std::function<size_t(const DataTypePtr &)> get_type_depth;
    get_type_depth = [&get_type_depth](const DataTypePtr & type) -> size_t
    {
        if (const auto * array_type = typeid_cast<const DataTypeArray *>(type.get()))
            return 1 + get_type_depth(array_type->getNestedType());
        else if (const auto * tuple_type = typeid_cast<const DataTypeTuple *>(type.get()))
            return 1 + (tuple_type->getElements().empty() ? 0 : get_type_depth(tuple_type->getElements().at(0)));
        return 0;
    };
    const size_t left_type_depth = get_type_depth(left_arg_type);
    const size_t right_type_depth = get_type_depth(right_arg_type);
    auto throw_unsupported_type = [](const auto & type)
    {
        throw Exception("Unsupported value type at the right-side of IN: "
            + type->getName() + ".", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
    };
    Block block;
    
    if (left_type_depth == right_type_depth)
    {
        Array array{right_arg_value};
        block = createBlockFromCollection(array, set_element_types, context);