mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 03:42:48 +00:00
28 lines
484 B
C++
28 lines
484 B
C++
#include <DB/Core/Block.h>
|
|
#include <DB/IO/ReadBuffer.h>
|
|
#include <DB/DataStreams/BinaryRowInputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
BinaryRowInputStream::BinaryRowInputStream(ReadBuffer & istr_)
|
|
: istr(istr_)
|
|
{
|
|
}
|
|
|
|
|
|
bool BinaryRowInputStream::read(Block & block)
|
|
{
|
|
if (istr.eof())
|
|
return false;
|
|
|
|
size_t columns = block.columns();
|
|
for (size_t i = 0; i < columns; ++i)
|
|
block.getByPosition(i).type.get()->deserializeBinary(*block.getByPosition(i).column.get(), istr);
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|