You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/08/16 16:30:49 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #6457: [enhancement] push down conditions on unique table value columns to base rowset

morningman commented on a change in pull request #6457:
URL: https://github.com/apache/incubator-doris/pull/6457#discussion_r689683646



##########
File path: be/src/olap/reader.h
##########
@@ -196,6 +199,7 @@ class Reader {
     std::vector<bool> _is_lower_keys_included;
     std::vector<bool> _is_upper_keys_included;
     Conditions _conditions;
+    Conditions _all_conditions;

Review comment:
       Add comment to explain `_conditions` and `_all_conditions`

##########
File path: be/src/olap/reader.cpp
##########
@@ -624,17 +633,22 @@ OLAPStatus Reader::_init_keys_param(const ReaderParams& read_params) {
 
 void Reader::_init_conditions_param(const ReaderParams& read_params) {
     _conditions.set_tablet_schema(&_tablet->tablet_schema());
+    _all_conditions.set_tablet_schema(&_tablet->tablet_schema());
     for (const auto& condition : read_params.conditions) {
         ColumnPredicate* predicate = _parse_to_predicate(condition);
         if (predicate != nullptr) {
             if (_tablet->tablet_schema()
                         .column(_tablet->field_index(condition.column_name))
                         .aggregation() != FieldAggregationMethod::OLAP_FIELD_AGGREGATION_NONE) {
                 _value_col_predicates.push_back(predicate);
+                OLAPStatus status = _all_conditions.append_condition(condition);
+                DCHECK_EQ(OLAP_SUCCESS, status);
             } else {
                 _col_predicates.push_back(predicate);
                 OLAPStatus status = _conditions.append_condition(condition);
                 DCHECK_EQ(OLAP_SUCCESS, status);
+                status = _all_conditions.append_condition(condition);

Review comment:
       `_all_conditions.append_condition(condition);` can be moved outside the `if-else` block?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org