mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Call doWritePrefix() if IOutputFormat works as Processor (i.e. clickhouse-local)
This fixes the *WithNames output format (lack of header before this patch).
This commit is contained in:
parent
ba92213d21
commit
d5a2e1e61c
@ -46,6 +46,12 @@ IOutputFormat::Status IOutputFormat::prepare()
|
||||
|
||||
void IOutputFormat::work()
|
||||
{
|
||||
if (!prefix_written)
|
||||
{
|
||||
doWritePrefix();
|
||||
prefix_written = true;
|
||||
}
|
||||
|
||||
if (finished && !finalized)
|
||||
{
|
||||
if (rows_before_limit_counter && rows_before_limit_counter->hasAppliedLimit())
|
||||
|
@ -87,6 +87,8 @@ private:
|
||||
/// Counters for consumed chunks. Are used for QueryLog.
|
||||
size_t result_rows = 0;
|
||||
size_t result_bytes = 0;
|
||||
|
||||
bool prefix_written = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user