disable PrettySpaceMonoBlock + writePrefix

This commit is contained in:
nikitamikhaylov 2020-10-05 20:50:01 +03:00
parent 5b7af8aa9c
commit a1010d708f
2 changed files with 21 additions and 7 deletions

View File

@ -216,7 +216,7 @@ BlockOutputStreamPtr FormatFactory::getOutput(const String & name,
const Settings & settings = context.getSettingsRef();
bool parallel_formatting = settings.output_format_parallel_formatting;
if (parallel_formatting)
if (parallel_formatting && name != "PrettyCompactMonoBlock")
{
const auto & output_getter = getCreators(name).output_processor_creator;

View File

@ -54,6 +54,11 @@ public:
need_flush = true;
}
void doWritePrefix() override
{
addChunk(Chunk{}, ProcessingUnitType::START);
}
protected:
void consume(Chunk chunk) override final
{
@ -90,6 +95,7 @@ private:
enum class ProcessingUnitType
{
START,
PLAIN,
TOTALS,
EXTREMES,
@ -232,9 +238,6 @@ private:
[&]{ return unit.status == READY_TO_READ; });
}
if (unit.type == ProcessingUnitType::FINALIZE)
break;
if (unit.type == ProcessingUnitType::TOTALS) {
}
@ -250,10 +253,15 @@ private:
++collector_unit_number;
{
std::lock_guard<std::mutex> lock(mutex);
unit.status = READY_TO_INSERT;
writer_condvar.notify_all();
}
if (unit.type == ProcessingUnitType::FINALIZE)
break;
}
}
catch (...)
{
@ -283,6 +291,11 @@ private:
switch (unit.type)
{
case ProcessingUnitType::START :
{
formatter->doWritePrefix();
break;
}
case ProcessingUnitType::PLAIN :
{
formatter->consume(std::move(unit.chunk));
@ -300,6 +313,7 @@ private:
}
case ProcessingUnitType::FINALIZE :
{
formatter->doWriteSuffix();
break;
}
}