This is an automated email from the ASF dual-hosted git repository.
zhaoc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 13fde9f Add stats to BetaRowsetReader (#2074)
13fde9f is described below
commit 13fde9fce3f76cd51289b6683afa6dd201f7f6ea
Author: lichaoyong <[email protected]>
AuthorDate: Sun Oct 27 12:06:39 2019 +0800
Add stats to BetaRowsetReader (#2074)
---
be/src/olap/rowset/beta_rowset_reader.cpp | 9 ++++++++-
be/src/olap/rowset/beta_rowset_reader.h | 2 ++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/be/src/olap/rowset/beta_rowset_reader.cpp
b/be/src/olap/rowset/beta_rowset_reader.cpp
index ace0f0a..b8013bc 100644
--- a/be/src/olap/rowset/beta_rowset_reader.cpp
+++ b/be/src/olap/rowset/beta_rowset_reader.cpp
@@ -38,7 +38,14 @@ OLAPStatus BetaRowsetReader::init(RowsetReaderContext*
read_context) {
// convert RowsetReaderContext to StorageReadOptions
StorageReadOptions read_options;
- read_options.stats = _context->stats;
+ if (_context->stats == nullptr) {
+ // schema change/compaction should use owned_stats
+ // When doing schema change/compaction,
+ // only statistics of this RowsetReader is necessary.
+ read_options.stats = &_owned_stats;
+ } else {
+ read_options.stats = _context->stats;
+ }
read_options.conditions = read_context->conditions;
if (read_context->lower_bound_keys != nullptr) {
for (int i = 0; i < read_context->lower_bound_keys->size(); ++i) {
diff --git a/be/src/olap/rowset/beta_rowset_reader.h
b/be/src/olap/rowset/beta_rowset_reader.h
index 44ea7d3..c4e244e 100644
--- a/be/src/olap/rowset/beta_rowset_reader.h
+++ b/be/src/olap/rowset/beta_rowset_reader.h
@@ -53,6 +53,8 @@ private:
BetaRowsetSharedPtr _rowset;
RowsetReaderContext* _context;
+ OlapReaderStatistics _owned_stats;
+
std::unique_ptr<RowwiseIterator> _iterator;
std::unique_ptr<RowBlockV2> _input_block;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]