| 10 | { |
| 11 | |
| 12 | void 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 | |
| 26 | void dumpChunkToJSON(const Chunk & chunk, const Block & header, WriteBuffer & buffer) |
| 27 | { |
no test coverage detected