mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-16 20:53:27 +00:00
32 lines
884 B
C++
32 lines
884 B
C++
#pragma once
|
||
|
||
#include <DB/DataTypes/DataTypeFactory.h>
|
||
#include <DB/DataStreams/IProfilingBlockInputStream.h>
|
||
|
||
|
||
namespace DB
|
||
{
|
||
|
||
/** Десериализует поток блоков из родного бинарного формата (с именами и типами столбцов).
|
||
* Предназначено для взаимодействия между серверами.
|
||
*/
|
||
class NativeBlockInputStream : public IProfilingBlockInputStream
|
||
{
|
||
public:
|
||
NativeBlockInputStream(ReadBuffer & istr_, const DataTypeFactory & data_type_factory_)
|
||
: istr(istr_), data_type_factory(data_type_factory_) {}
|
||
|
||
String getName() const { return "NativeBlockInputStream"; }
|
||
|
||
BlockInputStreamPtr clone() { return new NativeBlockInputStream(istr, data_type_factory); }
|
||
|
||
protected:
|
||
Block readImpl();
|
||
|
||
private:
|
||
ReadBuffer & istr;
|
||
const DataTypeFactory & data_type_factory;
|
||
};
|
||
|
||
}
|