This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 84c638ee68b [opt](Inverted index)Avoid repeated calculations of suffix 
paths (#48137) (#48155)
84c638ee68b is described below

commit 84c638ee68b471584425df4367e22e128a99292f
Author: qiye <l...@selectdb.com>
AuthorDate: Wed Mar 5 17:56:16 2025 +0800

    [opt](Inverted index)Avoid repeated calculations of suffix paths (#48137) 
(#48155)
    
    bp #48137
---
 be/src/olap/tablet_schema.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/tablet_schema.cpp b/be/src/olap/tablet_schema.cpp
index 488e9755b23..a1549c255d1 100644
--- a/be/src/olap/tablet_schema.cpp
+++ b/be/src/olap/tablet_schema.cpp
@@ -1411,11 +1411,11 @@ const TabletIndex* 
TabletSchema::get_inverted_index_with_index_id(
 
 const TabletIndex* TabletSchema::get_inverted_index(int32_t col_unique_id,
                                                     const std::string& 
suffix_path) const {
+    const std::string escaped_suffix = escape_for_path_name(suffix_path);
     for (size_t i = 0; i < _indexes.size(); i++) {
         if (_indexes[i].index_type() == IndexType::INVERTED) {
             for (int32_t id : _indexes[i].col_unique_ids()) {
-                if (id == col_unique_id &&
-                    _indexes[i].get_index_suffix() == 
escape_for_path_name(suffix_path)) {
+                if (id == col_unique_id && _indexes[i].get_index_suffix() == 
escaped_suffix) {
                     return &(_indexes[i]);
                 }
             }


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

Reply via email to