Merge pull request #39433 from ClickHouse/revert-39396-try-fix-write-buffer-terminate

Revert "Fix WriteBuffer finalize in destructor when cacnel query"
This commit is contained in:
Alexey Milovidov 2022-07-21 07:04:07 +03:00 committed by GitHub
commit 844042fc18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 32 deletions

View File

@ -73,6 +73,7 @@ void IOutputFormat::work()
setRowsBeforeLimit(rows_before_limit_counter->get());
finalize();
finalized = true;
return;
}
@ -119,12 +120,9 @@ void IOutputFormat::write(const Block & block)
void IOutputFormat::finalize()
{
if (finalized)
return;
writePrefixIfNot();
writeSuffixIfNot();
finalizeImpl();
finalized = true;
}
}

View File

@ -430,13 +430,6 @@ public:
writer->write(getHeader().cloneWithColumns(chunk.detachColumns()));
}
void onCancel() override
{
if (!writer)
return;
onFinish();
}
void onException() override
{
if (!writer)

View File

@ -813,13 +813,6 @@ public:
writer->write(getHeader().cloneWithColumns(chunk.detachColumns()));
}
void onCancel() override
{
if (!writer)
return;
onFinish();
}
void onException() override
{
if (!writer)

View File

@ -602,13 +602,6 @@ public:
writer->write(getHeader().cloneWithColumns(chunk.detachColumns()));
}
void onCancel() override
{
if (!writer)
return;
onFinish();
}
void onException() override
{
if (!writer)

View File

@ -450,13 +450,6 @@ void StorageURLSink::consume(Chunk chunk)
writer->write(getHeader().cloneWithColumns(chunk.detachColumns()));
}
void StorageURLSink::onCancel()
{
if (!writer)
return;
onFinish();
}
void StorageURLSink::onException()
{
if (!writer)

View File

@ -114,7 +114,6 @@ public:
std::string getName() const override { return "StorageURLSink"; }
void consume(Chunk chunk) override;
void onCancel() override;
void onException() override;
void onFinish() override;