mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
32 lines
545 B
C++
32 lines
545 B
C++
#pragma once
|
|
|
|
#include <Poco/SharedPtr.h>
|
|
|
|
#include <DB/DataStreams/IProfilingBlockInputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
using Poco::SharedPtr;
|
|
|
|
|
|
/** Реализует реляционную операцию LIMIT.
|
|
*/
|
|
class LimitBlockInputStream : public IProfilingBlockInputStream
|
|
{
|
|
public:
|
|
LimitBlockInputStream(BlockInputStreamPtr input_, size_t limit_, size_t offset_ = 0);
|
|
Block readImpl();
|
|
|
|
String getName() const { return "LimitBlockInputStream"; }
|
|
|
|
private:
|
|
BlockInputStreamPtr input;
|
|
size_t limit;
|
|
size_t offset;
|
|
size_t pos;
|
|
};
|
|
|
|
}
|