mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
28 lines
530 B
C++
28 lines
530 B
C++
#include <Core/Block.h>
|
|
#include <IO/ReadBuffer.h>
|
|
#include <DataStreams/BinaryRowInputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
BinaryRowInputStream::BinaryRowInputStream(ReadBuffer & istr_, const Block & header_)
|
|
: istr(istr_), header(header_)
|
|
{
|
|
}
|
|
|
|
|
|
bool BinaryRowInputStream::read(MutableColumns & columns)
|
|
{
|
|
if (istr.eof())
|
|
return false;
|
|
|
|
size_t num_columns = columns.size();
|
|
for (size_t i = 0; i < num_columns; ++i)
|
|
header.getByPosition(i).type->deserializeBinary(*columns[i], istr);
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|