| 1631 | } |
| 1632 | |
| 1633 | void Call::addExtremesToResult(const Block & extremes) |
| 1634 | { |
| 1635 | if (extremes.empty()) |
| 1636 | return; |
| 1637 | |
| 1638 | PODArray<char> memory; |
| 1639 | if (output_compression_method != CompressionMethod::None) |
| 1640 | memory.resize(DBMS_DEFAULT_BUFFER_SIZE); /// Must have enough space for compressed data. |
| 1641 | std::unique_ptr<WriteBuffer> buf = std::make_unique<WriteBufferFromVector<PODArray<char>>>(memory); |
| 1642 | buf = wrapWriteBufferWithCompressionMethod(std::move(buf), output_compression_method, output_compression_level); |
| 1643 | auto format = query_context->getOutputFormat(output_format, *buf, extremes); |
| 1644 | format->write(materializeBlock(extremes)); |
| 1645 | format->finalize(); |
| 1646 | buf->finalize(); |
| 1647 | |
| 1648 | result.mutable_extremes()->assign(memory.data(), memory.size()); |
| 1649 | } |
| 1650 | |
| 1651 | void Call::addProfileInfoToResult(const ProfileInfo & info) |
| 1652 | { |
nothing calls this directly
no test coverage detected