2017-04-28 18:33:31 +00:00
|
|
|
#pragma once
|
2018-08-24 05:37:06 +00:00
|
|
|
|
2019-01-23 14:48:50 +00:00
|
|
|
#include <DataStreams/IBlockInputStream.h>
|
2017-04-28 18:33:31 +00:00
|
|
|
|
2017-05-26 16:08:56 +00:00
|
|
|
namespace DB
|
2017-04-28 18:33:31 +00:00
|
|
|
{
|
2019-01-23 14:48:50 +00:00
|
|
|
class DictionaryBlockInputStreamBase : public IBlockInputStream
|
2017-04-28 18:33:31 +00:00
|
|
|
{
|
|
|
|
protected:
|
2019-02-10 16:55:12 +00:00
|
|
|
DictionaryBlockInputStreamBase(size_t rows_count, UInt64 max_block_size);
|
2017-04-28 18:33:31 +00:00
|
|
|
|
2017-05-26 16:08:56 +00:00
|
|
|
virtual Block getBlock(size_t start, size_t length) const = 0;
|
|
|
|
|
2018-02-18 03:23:48 +00:00
|
|
|
Block getHeader() const override;
|
2018-01-06 18:10:44 +00:00
|
|
|
|
2017-04-28 18:33:31 +00:00
|
|
|
private:
|
2017-05-26 16:08:56 +00:00
|
|
|
const size_t rows_count;
|
2019-02-10 16:55:12 +00:00
|
|
|
const UInt64 max_block_size;
|
2018-01-06 18:10:44 +00:00
|
|
|
size_t next_row = 0;
|
2017-04-28 18:33:31 +00:00
|
|
|
|
|
|
|
Block readImpl() override;
|
|
|
|
};
|
|
|
|
|
2017-05-26 16:08:56 +00:00
|
|
|
}
|