ClickHouse/dbms/DataStreams/narrowBlockInputStreams.h

23 lines
656 B
C++
Raw Normal View History

2012-06-25 02:52:51 +00:00
#pragma once
#include <DataStreams/IBlockInputStream.h>
2012-06-25 02:52:51 +00:00
namespace DB
{
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);
Pipes narrowPipes(Pipes pipes, size_t width);
2012-06-25 02:52:51 +00:00
}