mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
27 lines
463 B
C++
27 lines
463 B
C++
#include <Core/Block.h>
|
|
#include <DataStreams/IRowOutputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
void IRowOutputStream::write(const Block & block, size_t row_num)
|
|
{
|
|
size_t columns = block.columns();
|
|
|
|
writeRowStartDelimiter();
|
|
|
|
for (size_t i = 0; i < columns; ++i)
|
|
{
|
|
if (i != 0)
|
|
writeFieldDelimiter();
|
|
|
|
auto & col = block.getByPosition(i);
|
|
writeField(*col.column, *col.type, row_num);
|
|
}
|
|
|
|
writeRowEndDelimiter();
|
|
}
|
|
|
|
}
|