mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
28 lines
496 B
C++
28 lines
496 B
C++
#include <Core/Block.h>
|
|
#include <IO/ReadBuffer.h>
|
|
#include <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->deserializeBinary(*block.getByPosition(i).column.get(), istr);
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|