wangbo commented on a change in pull request #8787:
URL: https://github.com/apache/incubator-doris/pull/8787#discussion_r841034685



##########
File path: be/src/vec/columns/column_dictionary.h
##########
@@ -294,19 +294,14 @@ class ColumnDictionary final : public COWHelper<IColumn, 
ColumnDictionary<T>> {
             return -1;
         }
 
-        inline int32_t find_code_by_bound(const StringValue& value, bool 
lower, bool eq) const {
+        inline int32_t find_code_by_bound(const StringValue& value, bool 
greater, bool eq) const {
             auto code = find_code(value);
             if (code >= 0) {
                 return code;
             }
-
-            if (lower) {
-                return std::lower_bound(_dict_data.begin(), _dict_data.end(), 
value) -
-                       _dict_data.begin() - eq;
-            } else {
-                return std::upper_bound(_dict_data.begin(), _dict_data.end(), 
value) -
-                       _dict_data.begin() + eq;
-            }
+            auto bound = std::upper_bound(_dict_data.begin(), 
_dict_data.end(), value) -

Review comment:
       Need some comment to make here easier to understand




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to