ClickHouse/dbms/include/DB/DataStreams/PartialSortingBlockInputStream.h
2011-09-04 21:23:19 +00:00

33 lines
801 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <DB/Core/SortDescription.h>
#include <DB/DataStreams/IProfilingBlockInputStream.h>
namespace DB
{
/** Сортирует каждый блок по отдельности по значениям указанных столбцов.
* На данный момент, используется не очень оптимальный алгоритм.
*/
class PartialSortingBlockInputStream : public IProfilingBlockInputStream
{
public:
PartialSortingBlockInputStream(BlockInputStreamPtr input_, SortDescription & description_)
: input(input_), description(description_)
{
children.push_back(input);
}
Block readImpl();
String getName() const { return "PartialSortingBlockInputStream"; }
private:
BlockInputStreamPtr input;
SortDescription description;
};
}