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

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


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

commit a11296af75d86f2ee8a711fe5569287fe8f2bb92
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Feb 21 08:32:06 2025 +0800

    branch-3.0: [opt](Inverted index)Avoid repeated calculations of suffix 
paths #48137 (#48153)
    
    Cherry-picked from #48137
    
    Co-authored-by: qiye <l...@selectdb.com>
---
 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 9df75a84f6a..f4e22827994 100644
--- a/be/src/olap/tablet_schema.cpp
+++ b/be/src/olap/tablet_schema.cpp
@@ -1399,11 +1399,11 @@ bool 
TabletSchema::has_inverted_index_with_index_id(int64_t index_id) const {
 
 const TabletIndex* TabletSchema::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