mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
More fixes
This commit is contained in:
parent
f4f6e17bcd
commit
35215b24cf
@ -20,7 +20,6 @@
|
|||||||
#include <Common/ThreadStatus.h>
|
#include <Common/ThreadStatus.h>
|
||||||
#include <Common/UnicodeBar.h>
|
#include <Common/UnicodeBar.h>
|
||||||
#include <Common/config_version.h>
|
#include <Common/config_version.h>
|
||||||
#include <Common/escapeForFileName.h>
|
|
||||||
#include <Common/quoteString.h>
|
#include <Common/quoteString.h>
|
||||||
#include <IO/ReadBufferFromFile.h>
|
#include <IO/ReadBufferFromFile.h>
|
||||||
#include <IO/ReadBufferFromString.h>
|
#include <IO/ReadBufferFromString.h>
|
||||||
@ -393,7 +392,7 @@ void LocalServer::processQueries()
|
|||||||
///Set progress show
|
///Set progress show
|
||||||
progress_bar.setNeedRenderProgress(config().getBool("progress", false));
|
progress_bar.setNeedRenderProgress(config().getBool("progress", false));
|
||||||
|
|
||||||
context.setProgressCallback([&](const Progress &value){
|
context->setProgressCallback([&](const Progress &value){
|
||||||
progress_bar.updateProgress(progress, value);
|
progress_bar.updateProgress(progress, value);
|
||||||
progress_bar.writeProgress(progress, watch);
|
progress_bar.writeProgress(progress, watch);
|
||||||
return true;
|
return true;
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
#include <Common/UnicodeBar.h>
|
#include <Common/UnicodeBar.h>
|
||||||
#include <Databases/DatabaseMemory.h>
|
#include <Databases/DatabaseMemory.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace DB {
|
namespace DB {
|
||||||
bool ProgressBar::getNeedRenderProgress() const
|
bool ProgressBar::getNeedRenderProgress() const
|
||||||
{
|
{
|
||||||
@ -49,12 +45,12 @@ void ProgressBar::setWrittenFirstBlock(bool writtenFirstBlock)
|
|||||||
written_first_block = writtenFirstBlock;
|
written_first_block = writtenFirstBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProgressBar::updateProgress(Progress & progress, const Progress &value)
|
bool ProgressBar::updateProgress(Progress &progress, const Progress &value)
|
||||||
{
|
{
|
||||||
return progress.incrementPiecewiseAtomically(value);
|
return progress.incrementPiecewiseAtomically(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgressBar::writeProgress(const Progress & progress, const Stopwatch & watch) {
|
void ProgressBar::writeProgress(const Progress &progress, const Stopwatch &watch) {
|
||||||
if (!need_render_progress)
|
if (!need_render_progress)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ class ProgressBar
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
bool updateProgress(Progress & progress, const Progress &value);
|
bool updateProgress(Progress &progress, const Progress &value);
|
||||||
void writeProgress(const Progress & progress, const Stopwatch & watch);
|
void writeProgress(const Progress &progress, const Stopwatch &watch);
|
||||||
|
|
||||||
///Required Getters
|
///Required Getters
|
||||||
bool getNeedRenderProgress() const;
|
bool getNeedRenderProgress() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user