mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 01:12:12 +00:00
updated MergeTreePrewhereRangeReader; renamed MergeTreePrewhereRangeReader to MergeTreeRangeReader
This commit is contained in:
parent
3063c35429
commit
dcd99860fe
@ -147,8 +147,8 @@ Block MergeTreeBaseBlockInputStream::readFromPart()
|
||||
if (task->size_predictor)
|
||||
{
|
||||
task->size_predictor->updateFilteredRowsRation(
|
||||
read_result.getNumAddedRows() + read_result.getNumFilteredRows(),
|
||||
read_result.getNumFilteredRows());
|
||||
read_result.numAddedRows() + read_result.numFilteredRows(),
|
||||
read_result.numFilteredRows());
|
||||
|
||||
if (read_result.block)
|
||||
task->size_predictor->update(read_result.block);
|
||||
|
@ -449,10 +449,11 @@ MergeTreeRangeReader::ReadResult MergeTreeRangeReader::startReadingChain(size_t
|
||||
result.addRows(stream.finalize(result.block));
|
||||
|
||||
auto last_granule = result.rowsPerGranule().back();
|
||||
auto added_rows =result.getNumAddedRows();
|
||||
auto added_rows = result.numAddedRows();
|
||||
auto num_read_rows = result.numReadRows();
|
||||
|
||||
if (max_rows - last_granule > added_rows)
|
||||
throw Exception("RangeReader expected reading of at least " + toString(max_rows - last_granule) +
|
||||
if (num_read_rows - last_granule > added_rows)
|
||||
throw Exception("RangeReader expected reading of at least " + toString(num_read_rows - last_granule) +
|
||||
" rows, but only " + toString(added_rows) + " was read.", ErrorCodes::LOGICAL_ERROR);
|
||||
|
||||
/// Last granule may be incomplete.
|
||||
|
@ -107,9 +107,9 @@ public:
|
||||
/// The number of rows were read at LAST iteration in chain. <= num_added_rows + num_filtered_rows.
|
||||
size_t numReadRows() const { return num_read_rows; }
|
||||
/// The number of rows were added to block as a result of reading chain.
|
||||
size_t getNumAddedRows() const { return num_added_rows; }
|
||||
size_t numAddedRows() const { return num_added_rows; }
|
||||
/// The number of filtered rows at all steps in reading chain.
|
||||
size_t getNumFilteredRows() const { return num_filtered_rows; }
|
||||
size_t numFilteredRows() const { return num_filtered_rows; }
|
||||
/// Filter you need to apply to newly-read columns in order to add them to block.
|
||||
const ColumnPtr & getFilter() const { return filter; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user