mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
Fix progress for insert select.
This commit is contained in:
parent
81bf13a247
commit
eed4e8c754
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
@ -310,7 +310,20 @@ void TCPHandler::runImpl()
|
||||
CompletedPipelineExecutor executor(state.io.pipeline);
|
||||
/// Should not check for cancel in case of input.
|
||||
if (!state.need_receive_data_for_input)
|
||||
executor.setCancelCallback([this]() { return isQueryCancelled(); }, interactive_delay / 1000);
|
||||
{
|
||||
auto callback = [this]()
|
||||
{
|
||||
if (isQueryCancelled())
|
||||
return true;
|
||||
|
||||
sendProgress();
|
||||
sendLogs();
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
executor.setCancelCallback(callback, interactive_delay / 1000);
|
||||
}
|
||||
executor.execute();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user