Clarifications [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-09-10 04:39:40 +03:00
parent cd540c2674
commit cf5fd27b94
3 changed files with 8 additions and 4 deletions

View File

@ -115,7 +115,7 @@ protected:
return res;
/// Start the next block calculation
block = Block();
block.clear();
next();
return res;

View File

@ -49,6 +49,8 @@ public:
/** Read next block.
* If there are no more blocks, return an empty block (for which operator `bool` returns false).
* NOTE: Only one thread can read from one instance of IBlockInputStream simultaneously.
* This also applies for readPrefix, readSuffix.
*/
virtual Block read() = 0;

View File

@ -174,8 +174,6 @@ protected:
ProgressCallback progress_callback;
ProcessListElement * process_list_elem = nullptr;
bool enabled_extremes = false;
/// Additional information that can be generated during the work process.
/// Total values during aggregation.
@ -184,6 +182,10 @@ protected:
Block extremes;
/// The approximate total number of rows to read. For progress bar.
size_t total_rows_approx = 0;
private:
bool enabled_extremes = false;
/// Information about the approximate total number of rows is collected in the parent source.
bool collected_total_rows_approx = false;
@ -218,7 +220,7 @@ protected:
void collectTotalRowsApprox();
/** Send information about the approximate total number of rows to the progress bar.
* It is done so that sending occurs only in the upper source.
* It is done so that sending occurs only in the upper stream.
*/
void collectAndSendTotalRowsApprox();
};