2012-06-25 02:52:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <DataStreams/IBlockInputStream.h>
|
2012-06-25 02:52:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2020-01-31 16:29:40 +00:00
|
|
|
class Pipe;
|
|
|
|
using Pipes = std::vector<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
|
|
|
*/
|
2012-06-25 03:04:34 +00:00
|
|
|
BlockInputStreams narrowBlockInputStreams(BlockInputStreams & inputs, size_t width);
|
2020-01-31 16:29:40 +00:00
|
|
|
Pipes narrowPipes(Pipes pipes, size_t width);
|
2012-06-25 02:52:51 +00:00
|
|
|
|
|
|
|
}
|