1#include <Processors/Formats/OutputStreamToOutputFormat.h>
2#include <Processors/Formats/IOutputFormat.h>
3
4namespace DB
5{
6
7Block OutputStreamToOutputFormat::getHeader() const
8{
9 return output_format->getPort(IOutputFormat::PortKind::Main).getHeader();
10}
11
12void OutputStreamToOutputFormat::write(const Block & block)
13{
14 output_format->write(block);
15}
16
17void OutputStreamToOutputFormat::writePrefix() { output_format->doWritePrefix(); }
18void OutputStreamToOutputFormat::writeSuffix() { output_format->doWriteSuffix(); }
19
20void OutputStreamToOutputFormat::flush() { output_format->flush(); }
21
22void OutputStreamToOutputFormat::setRowsBeforeLimit(size_t rows_before_limit)
23{
24 output_format->setRowsBeforeLimit(rows_before_limit);
25}
26
27void OutputStreamToOutputFormat::setTotals(const Block & totals)
28{
29 if (totals)
30 output_format->setTotals(totals);
31}
32
33void OutputStreamToOutputFormat::setExtremes(const Block & extremes)
34{
35 if (extremes)
36 output_format->setExtremes(extremes);
37}
38
39void OutputStreamToOutputFormat::onProgress(const Progress & progress) { output_format->onProgress(progress); }
40
41std::string OutputStreamToOutputFormat::getContentType() const { return output_format->getContentType(); }
42
43}
44