2012-06-25 02:52:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-07-17 18:06:46 +00:00
|
|
|
#include <cstddef>
|
2012-06-25 02:52:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2020-01-31 16:29:40 +00:00
|
|
|
class Pipe;
|
|
|
|
|
2017-05-13 22:19:04 +00:00
|
|
|
/** If the number of sources of `inputs` is greater than `width`,
|
|
|
|
* then glues the sources to each other (using ConcatBlockInputStream),
|
|
|
|
* so that the number of sources becomes no more than `width`.
|
2012-06-25 02:52:51 +00:00
|
|
|
*
|
2017-05-13 22:19:04 +00:00
|
|
|
* 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)
|
2012-06-25 02:52:51 +00:00
|
|
|
*/
|
2020-08-03 11:33:11 +00:00
|
|
|
void narrowPipe(Pipe & pipe, size_t width);
|
2012-06-25 02:52:51 +00:00
|
|
|
|
|
|
|
}
|