MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / dumpBlockToJSON

Function dumpBlockToJSON

src/Common/blockDumper.cpp:12–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10{
11
12void dumpBlockToJSON(const Block & block, WriteBuffer & buffer)
13{
14 if (block.empty())
15 {
16 buffer.write("{}", 2);
17 return;
18 }
19
20 auto materialized_block = materializeBlock(block);
21 auto output_format = FormatFactory::instance().getDefaultJSONEachRowOutputFormat(buffer, materialized_block);
22 output_format->write(materialized_block);
23 output_format->finalize();
24}
25
26void dumpChunkToJSON(const Chunk & chunk, const Block & header, WriteBuffer & buffer)
27{

Callers 1

dumpChunkToJSONFunction · 0.85

Calls 5

materializeBlockFunction · 0.85
emptyMethod · 0.45
writeMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected