21.7.3 throws an exception if `_sample_factor` is used in a query:
```
CREATE TABLE sessions
(
  `user_id` UInt64
)
ENGINE = MergeTree
ORDER BY user_id 
SAMPLE BY user_id;

insert into sessions values(1);

SELECT
    sum(user_id * _sample_factor) 
FROM sessions
SAMPLE 10000000

DB::Exception: Cannot find column `user_id` in source stream (version 21.8.1.7409 (official build))

SELECT
    sum(user_id) 
FROM sessions
SAMPLE 10000000

sum(user_id)
------------
           1
```
No exception on 21.6.5
out_projection = createProjection(pipe.getHeader());
        }
        auto sorting_expr = std::make_shared<ExpressionActions>(
            metadata_snapshot->getSortingKey().expression->getActionsDAG().clone());
        pipe.addSimpleTransform([sorting_expr](const Block & header)
        {
            return std::make_shared<ExpressionTransform>(header, sorting_expr);
        });
        
        
        if (settings.do_not_merge_across_partitions_select_final &&
            std::distance(parts_to_merge_ranges[range_index], parts_to_merge_ranges[range_index + 1]) == 1 &&
            parts_to_merge_ranges[range_index]->data_part->info.level > 0)
        {
            partition_pipes.emplace_back(std::move(pipe));
            continue;
        }
        Names sort_columns = metadata_snapshot->getSortingKeyColumns();
        SortDescription sort_description;
        size_t sort_columns_size = sort_columns.size();
        sort_description.reserve(sort_columns_size);
        Names partition_key_columns = metadata_snapshot->getPartitionKey().column_names;
        const auto & header = pipe.getHeader();
        for (size_t i = 0; i < sort_columns_size; ++i)
            sort_description.emplace_back(header.getPositionByName(sort_columns[i]), 1, 1);
        addMergingFinal(
            pipe,
            std::min<size_t>(num_streams, settings.max_final_threads),
            sort_description, data.merging_params, partition_key_columns, max_block_size);
        partition_pipes.emplace_back(std::move(pipe));