Write header only once in TSVWithNames*

This commit is contained in:
Azat Khuzhin 2020-08-04 23:49:30 +03:00
parent f18b06f7fa
commit ba92213d21
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ TabSeparatedRowOutputFormat::TabSeparatedRowOutputFormat(
}
void TabSeparatedRowOutputFormat::writePrefix()
void TabSeparatedRowOutputFormat::doWritePrefix()
{
const auto & header = getPort(PortKind::Main).getHeader();
size_t columns = header.columns();

View File

@ -31,10 +31,11 @@ public:
void writeField(const IColumn & column, const IDataType & type, size_t row_num) override;
void writeFieldDelimiter() override;
void writeRowEndDelimiter() override;
void writePrefix() override;
void writeBeforeTotals() override;
void writeBeforeExtremes() override;
void doWritePrefix() override;
/// https://www.iana.org/assignments/media-types/text/tab-separated-values
String getContentType() const override { return "text/tab-separated-values; charset=UTF-8"; }