ClickHouse/dbms/include/DB/DataStreams/PartialSortingBlockInputStream.h

28 lines
677 B
C
Raw Normal View History

2011-09-04 00:22:19 +00:00
#pragma once
2011-09-04 01:42:14 +00:00
#include <DB/Core/SortDescription.h>
2011-09-04 00:22:19 +00:00
#include <DB/DataStreams/IBlockInputStream.h>
namespace DB
{
/** Сортирует каждый блок по отдельности по значениям указанных столбцов.
2011-09-04 01:42:14 +00:00
* На данный момент, используется не очень оптимальный алгоритм.
2011-09-04 00:22:19 +00:00
*/
class PartialSortingBlockInputStream : public IBlockInputStream
{
public:
2011-09-04 01:42:14 +00:00
PartialSortingBlockInputStream(BlockInputStreamPtr input_, SortDescription & description_)
: input(input_), description(description_) {}
2011-09-04 00:22:19 +00:00
Block read();
private:
BlockInputStreamPtr input;
2011-09-04 01:42:14 +00:00
SortDescription description;
2011-09-04 00:22:19 +00:00
};
}