```
milovidov-desktop :) SELECT * FROM (SELECT 'Hello' AS x) PREWHERE toLowCardinality(x) IN ('Hello', 'World')

SELECT *
FROM
(
    SELECT 'Hello' AS x
)
PREWHERE toLowCardinality(x) IN ('Hello', 'World')

Query id: 58d92e01-c67e-4bcc-8b0c-788bb5e1287e


0 rows in set. Elapsed: 0.037 sec. 

Received exception from server (version 21.7.1):
Code: 182. DB::Exception: Received from localhost:9000. DB::Exception: Illegal PREWHERE. 

milovidov-desktop :) SELECT * FROM (SELECT toLowCardinality('Hello') AS x) PREWHERE x IN ('Hello', 'World')

SELECT *
FROM
(
    SELECT toLowCardinality('Hello') AS x
)
PREWHERE x IN ('Hello', 'World')

Query id: 694bbad9-d228-47b8-ad60-c037005c7ee2


0 rows in set. Elapsed: 0.003 sec. 

Received exception from server (version 21.7.1):
Code: 182. DB::Exception: Received from localhost:9000. DB::Exception: Illegal PREWHERE. 

milovidov-desktop :) SELECT * FROM (SELECT toLowCardinality(materialize('Hello')) AS x) PREWHERE x IN ('Hello', 'World')

SELECT *
FROM
(
    SELECT toLowCardinality(materialize('Hello')) AS x
)
PREWHERE x IN ('Hello', 'World')

Query id: fc271924-c17c-457c-8cf8-21d0515388b7


0 rows in set. Elapsed: 0.003 sec. 

Received exception from server (version 21.7.1):
Code: 182. DB::Exception: Received from localhost:9000. DB::Exception: Illegal PREWHERE.
```
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, [[maybe_unused]] size_t input_rows_count) const override
    {
        if constexpr (ignore_set)
            return ColumnUInt8::create(input_rows_count, 0u);
        
        ColumnPtr column_set_ptr = arguments[1].column;
        const ColumnSet * column_set = checkAndGetColumnConstData<const ColumnSet>(column_set_ptr.get());
        if (!column_set)
            column_set = checkAndGetColumn<const ColumnSet>(column_set_ptr.get());
        if (!column_set)
            throw Exception("Second argument for function '" + getName() + "' must be Set; found " + column_set_ptr->getName(),
                ErrorCodes::ILLEGAL_COLUMN);
        DB::Block columns_of_key_columns;
        
        const ColumnWithTypeAndName & left_arg = arguments[0];
        const ColumnTuple * tuple = typeid_cast<const ColumnTuple *>(left_arg.column.get());
        const ColumnConst * const_tuple = checkAndGetColumnConst<ColumnTuple>(left_arg.column.get());
        const DataTypeTuple * type_tuple = typeid_cast<const DataTypeTuple *>(left_arg.type.get());
        ColumnPtr materialized_tuple;
        if (const_tuple)
        {
            materialized_tuple = const_tuple->convertToFullColumn();
            tuple = typeid_cast<const ColumnTuple *>(materialized_tuple.get());
        }
        auto set = column_set->getData();
        auto set_types = set->getDataTypes();
        if (tuple && (set_types.size() != 1 || !set_types[0]->equals(*type_tuple)))
        {
            const auto & tuple_columns = tuple->getColumns();