aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/QueryPipeline/narrowPipe.h
blob: e271669b8d1ead19bd2b2340a6952bb9fb3850b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <cstddef>


namespace DB
{

class Pipe;

/** If the number of sources of `inputs` is greater than `width`,
  *  then glues the sources to each other (using ConcatProcessor),
  *  so that the number of sources becomes no more than `width`.
  *
  * Trying to glue the sources with each other uniformly randomly.
  *  (to avoid overweighting if the distribution of the amount of data in different sources is subject to some pattern)
  */
void narrowPipe(Pipe & pipe, size_t width);

}