Gabriel39 commented on code in PR #12852: URL: https://github.com/apache/doris/pull/12852#discussion_r978294410
########## be/src/vec/columns/column_dictionary.h: ########## @@ -360,40 +356,50 @@ class ColumnDictionary final : public COWHelper<IColumn, ColumnDictionary<T>> { if (code >= 0) { return code; } - auto bound = std::upper_bound(_dict_data.begin(), _dict_data.end(), value) - - _dict_data.begin(); + auto bound = std::upper_bound(_dict_data->begin(), _dict_data->end(), value) - + _dict_data->begin(); return greater ? bound - greater + eq : bound - eq; } void find_codes(const phmap::flat_hash_set<StringValue>& values, std::vector<vectorized::UInt8>& selected) const { - size_t dict_word_num = _dict_data.size(); + size_t dict_word_num = _dict_data->size(); selected.resize(dict_word_num); selected.assign(dict_word_num, false); - for (const auto& value : values) { - if (auto it = _inverted_index.find(value); it != _inverted_index.end()) { - selected[it->second] = true; + for (size_t i = 0; i < _dict_data->size(); i++) { + if (values.find((*_dict_data)[i]) != values.end()) { + selected[i] = true; } } } void clear() { - _dict_data.clear(); - _inverted_index.clear(); - _code_convert_table.clear(); Review Comment: Sorry, this is a mistake and I fixed it. Btw, I provide a performance test in this PR's description -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org