`Selected 13 parts by date, 13 parts by key, 26 marks by primary key .... `

This message is confusing for new users.

I suggest to replace it with

`Selected 13 parts by partition key, 13 parts by primary key, 26 marks by primary key...`
{
                ranges_to_get_from_part = part.ranges;
                need_marks -= marks_in_part;
                sum_marks_in_parts.pop_back();
            }
            else
            {
                
                while (need_marks > 0)
                {
                    if (part.ranges.empty())
                        throw Exception("Unexpected end of ranges while spreading marks among streams", ErrorCodes::LOGICAL_ERROR);
                    MarkRange & range = part.ranges.front();
                    const size_t marks_in_range = range.end - range.begin;
                    const size_t marks_to_get_from_range = std::min(marks_in_range, need_marks);
                    ranges_to_get_from_part.emplace_back(range.begin, range.begin + marks_to_get_from_range);
                    range.begin += marks_to_get_from_range;
                    marks_in_part -= marks_to_get_from_range;
                    need_marks -= marks_to_get_from_range;
                    if (range.begin == range.end)
                        part.ranges.pop_front();
                }
                parts.emplace_back(part);
            }
            ranges_to_get_from_part = split_ranges(ranges_to_get_from_part, input_order_info->direction);
            if (input_order_info->direction == 1)
            {
                pipes.emplace_back(std::make_shared<MergeTreeSelectProcessor>(
                    data,
                    metadata_snapshot,