You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/06/24 20:31:24 UTC
[doris] branch master updated: [fix]Make sure only call once set_dict_encoding_type for each ColumnReader (#10389)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 7921320124 [fix]Make sure only call once set_dict_encoding_type for each ColumnReader (#10389)
7921320124 is described below
commit 7921320124b05f87ac71c38b3a2d2fbc2e7b1361
Author: Jerry Hu <mr...@gmail.com>
AuthorDate: Sat Jun 25 04:31:19 2022 +0800
[fix]Make sure only call once set_dict_encoding_type for each ColumnReader (#10389)
---
be/src/olap/rowset/segment_v2/column_reader.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/be/src/olap/rowset/segment_v2/column_reader.h b/be/src/olap/rowset/segment_v2/column_reader.h
index 1312a0eb89..b82dbabb01 100644
--- a/be/src/olap/rowset/segment_v2/column_reader.h
+++ b/be/src/olap/rowset/segment_v2/column_reader.h
@@ -138,7 +138,9 @@ public:
uint64_t num_rows() { return _num_rows; }
- void set_dict_encoding_type(DictEncodingType type) { _dict_encoding_type = type; }
+ void set_dict_encoding_type(DictEncodingType type) {
+ std::call_once(_set_dict_encoding_type_flag, [&] { _dict_encoding_type = type; });
+ }
DictEncodingType get_dict_encoding_type() { return _dict_encoding_type; }
@@ -202,6 +204,8 @@ private:
std::unique_ptr<BloomFilterIndexReader> _bloom_filter_index;
std::vector<std::unique_ptr<ColumnReader>> _sub_readers;
+
+ std::once_flag _set_dict_encoding_type_flag;
};
// Base iterator to read one column data
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org