1 | #pragma once |
2 | |
3 | #include <DataStreams/IBlockInputStream.h> |
4 | |
5 | |
6 | namespace DB |
7 | { |
8 | |
9 | /** If the number of sources of `inputs` is greater than `width`, |
10 | * then glues the sources to each other (using ConcatBlockInputStream), |
11 | * so that the number of sources becomes no more than `width`. |
12 | * |
13 | * Trying to glue the sources with each other uniformly randomly. |
14 | * (to avoid overweighting if the distribution of the amount of data in different sources is subject to some pattern) |
15 | */ |
16 | BlockInputStreams narrowBlockInputStreams(BlockInputStreams & inputs, size_t width); |
17 | |
18 | } |
19 | |