mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 03:53:41 +00:00
82a361d0e9
* Show error to client if query was killed
* Kill exception v2
* Use kill
* fix
* wip
* fix
* fxi
* try fix
* Revert "try fix"
This reverts commit eb76e4c040
.
* QUERY_WASCANCELLED
* Fxi all cancel()
* fix
42 lines
847 B
C++
42 lines
847 B
C++
#include <Columns/ColumnsNumber.h>
|
|
|
|
#include <DataStreams/MergingAggregatedBlockInputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
Block MergingAggregatedBlockInputStream::getHeader() const
|
|
{
|
|
return aggregator.getHeader(final);
|
|
}
|
|
|
|
|
|
Block MergingAggregatedBlockInputStream::readImpl()
|
|
{
|
|
if (!executed)
|
|
{
|
|
executed = true;
|
|
AggregatedDataVariants data_variants;
|
|
|
|
Aggregator::CancellationHook hook = [&]() { return this->isCancelled(); };
|
|
aggregator.setCancellationHook(hook);
|
|
|
|
aggregator.mergeStream(children.back(), data_variants, max_threads);
|
|
blocks = aggregator.convertToBlocks(data_variants, final, max_threads);
|
|
it = blocks.begin();
|
|
}
|
|
|
|
Block res;
|
|
if (isCancelledOrThrowIfKilled() || it == blocks.end())
|
|
return res;
|
|
|
|
res = std::move(*it);
|
|
++it;
|
|
|
|
return res;
|
|
}
|
|
|
|
|
|
}
|