This is an automated email from the ASF dual-hosted git repository.
morningman 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 5745adb [improvement](reader) optimize for single rowset reading
(#7351)
5745adb is described below
commit 5745adb26cc87b7f9831a692286bc7cb565d31aa
Author: GoGoWen <[email protected]>
AuthorDate: Sat Dec 11 16:53:56 2021 +0800
[improvement](reader) optimize for single rowset reading (#7351)
read single rowset without do aggregation when reading all columns,
and otherwise should use `_agg_key_next_row`
---
be/src/olap/tuple_reader.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/tuple_reader.cpp b/be/src/olap/tuple_reader.cpp
index 626956e..37daa92 100644
--- a/be/src/olap/tuple_reader.cpp
+++ b/be/src/olap/tuple_reader.cpp
@@ -79,9 +79,16 @@ OLAPStatus TupleReader::init(const ReaderParams&
read_params) {
auto status = _init_collect_iter(read_params, &rs_readers);
if (status != OLAP_SUCCESS) { return status; }
+ // optimize for single rowset reading without do aggregation when reading
all columns,
+ // and otherwise should use _agg_key_next_row for AGG_KEYS
if (_optimize_for_single_rowset(rs_readers)) {
- _next_row_func = _tablet->keys_type() == AGG_KEYS ?
&TupleReader::_direct_agg_key_next_row
- :
&TupleReader::_direct_next_row;
+ if(_tablet->keys_type() == AGG_KEYS && _return_columns.size() ==
_tablet->tablet_schema().num_columns()) {
+ _next_row_func = &TupleReader::_direct_agg_key_next_row;
+ } else if (_tablet->keys_type() == AGG_KEYS) {
+ _next_row_func = &TupleReader::_agg_key_next_row;
+ } else {
+ _next_row_func = &TupleReader::_direct_next_row;
+ }
return OLAP_SUCCESS;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]