Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion be/src/exec/olap_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ Status OlapScanner::get_batch(

// compute pushdown conjuncts filter rate
if (_use_pushdown_conjuncts) {
// check this rate after
// check this rate after
if (_num_rows_read > 32768) {
int32_t pushdown_return_rate
= _num_rows_read * 100 / (_num_rows_read + _num_rows_pushed_cond_filtered);
Expand Down Expand Up @@ -447,6 +447,8 @@ void OlapScanner::update_counter() {
COUNTER_UPDATE(_parent->_block_convert_timer, _reader->stats().block_convert_ns);

COUNTER_UPDATE(_parent->_raw_rows_counter, _reader->stats().raw_rows_read);
// if raw_rows_read is reset, scanNode will scan all table rows which may cause BE crash
_raw_rows_read += _reader->mutable_stats()->raw_rows_read;
// COUNTER_UPDATE(_parent->_filtered_rows_counter, _reader->stats().num_rows_filtered);

COUNTER_UPDATE(_parent->_vec_cond_timer, _reader->stats().vec_cond_ns);
Expand All @@ -467,6 +469,7 @@ void OlapScanner::_update_realtime_counter() {
COUNTER_UPDATE(_parent->_read_compressed_counter, _reader->stats().compressed_bytes_read);
COUNTER_UPDATE(_parent->_raw_rows_counter, _reader->stats().raw_rows_read);
_reader->mutable_stats()->compressed_bytes_read = 0;
_raw_rows_read += _reader->mutable_stats()->raw_rows_read;
_reader->mutable_stats()->raw_rows_read = 0;
}

Expand Down
3 changes: 2 additions & 1 deletion be/src/exec/olap_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class OlapScanner {
bool is_open() const { return _is_open; }
void set_opened() { _is_open = true; }

int64_t raw_rows_read() const { return _reader->stats().raw_rows_read; }
int64_t raw_rows_read() const { return _raw_rows_read; }

void update_counter();
private:
Expand Down Expand Up @@ -135,6 +135,7 @@ class OlapScanner {

RuntimeProfile::Counter* _rows_read_counter = nullptr;
int64_t _num_rows_read = 0;
int64_t _raw_rows_read = 0;

RuntimeProfile::Counter* _rows_pushed_cond_filtered_counter = nullptr;
// number rows filtered by pushed condition
Expand Down