**Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/19387/fb268ec339aeb2cbab0df5137ead3efb8374cc32/fuzzer_debug/server.log

**How to reproduce**
```
SELECT avg(diff) FROM (SELECT * FROM (SELECT learnerHash, passed - eventTime AS diff FROM statements GLOBAL SEMI LEFT JOIN (SELECT learnerHash, argMax(eventTime, resultScoreRaw) AS passed FROM (SELECT learnerHash, eventTime, resultScoreRaw FROM statements WHERE (courseId = 1) AND (onCourse = 1048575) AND (verb = 'http://adlnet.gov/expapi/verbs/passed') AND (objectId = 'https://crmm.ru/xapi/courses/spp/1/1/0-1') ORDER BY eventTime ASC) GROUP BY learnerHash) USING (learnerHash) WHERE resultScoreRaw AND (courseId = 1) AND (onCourse = 0) AND (verb = 'http://adlnet.gov/expapi/verbs/interacted') AND (eventTime <= passed) AND (diff > 0) ORDER BY eventTime DESC LIMIT 0 BY learnerHash) ORDER BY diff DESC LIMIT 7, 126)
```

Looks like query is based on `00586_removing_unused_columns_from_subquery.sql`.

MergeTreeBaseSelectProcessor.cpp:331

```
            auto & ctn = block.getByName(prewhere_info->prewhere_column_name);
            ctn.column = ctn.type->createColumnConst(block.rows(), 1u)->convertToFullColumnIfConst();
```

Looks like `prewhere_column_name` has type Float64.
Block & block, MergeTreeReadTask * task, const DataTypePtr & partition_value_type, const Names & virtual_columns)
{
    VirtualColumnsInserterIntoBlock inserter{block};
    injectVirtualColumnsImpl(block.rows(), inserter, task, partition_value_type, virtual_columns);
}
void MergeTreeBaseSelectProcessor::injectVirtualColumns(
    Chunk & chunk, MergeTreeReadTask * task, const DataTypePtr & partition_value_type, const Names & virtual_columns)
{
    UInt64 num_rows = chunk.getNumRows();
    auto columns = chunk.detachColumns();
    VirtualColumnsInserterIntoColumns inserter{columns};
    injectVirtualColumnsImpl(num_rows, inserter, task, partition_value_type, virtual_columns);
    chunk.setColumns(columns, num_rows);
}
void MergeTreeBaseSelectProcessor::executePrewhereActions(Block & block, const PrewhereInfoPtr & prewhere_info)
{
    if (prewhere_info)
    {
        if (prewhere_info->alias_actions)
            prewhere_info->alias_actions->execute(block);
        if (prewhere_info->row_level_filter)
        {
            prewhere_info->row_level_filter->execute(block);
            auto & row_level_column = block.getByName(prewhere_info->row_level_column_name);
            if (!row_level_column.type->canBeUsedInBooleanContext())
            {
                throw Exception("Invalid type for filter in PREWHERE: " + row_level_column.type->getName(),
                    ErrorCodes::LOGICAL_ERROR);