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
if (need_preliminary_merge)
    {
        SortDescription sort_description;
        for (size_t j = 0; j < input_order_info->order_key_prefix_descr.size(); ++j)
            sort_description.emplace_back(metadata_snapshot->getSortingKey().column_names[j],
                                          input_order_info->direction, 1);
        auto sorting_key_expr = std::make_shared<ExpressionActions>(sorting_key_prefix_expr);
        for (auto & pipe : pipes)
        {
            
            out_projection = createProjection(pipe.getHeader());
            pipe.addSimpleTransform([sorting_key_expr](const Block & header)
            {
                return std::make_shared<ExpressionTransform>(header, sorting_key_expr);
            });
            if (pipe.numOutputPorts() > 1)
            {
                auto transform = std::make_shared<MergingSortedTransform>(
                        pipe.getHeader(),
                        pipe.numOutputPorts(),
                        sort_description,
                        max_block_size,
                        0, true);
                pipe.addTransform(std::move(transform));
            }
        }
    }
    return Pipe::unitePipes(std::move(pipes));
}
static void addMergingFinal(