Skip to content

Commit

Permalink
[optimize](invert index) avoid redundant checks for exist. (apache#30191
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zzzxl1993 authored Jan 29, 2024
1 parent 2da2b20 commit 453c345
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions be/src/olap/rowset/segment_v2/inverted_index_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,6 @@ Status FullTextIndexReader::query(OlapReaderStatistics* stats, RuntimeState* run
}
}

// check index file existence
if (!indexExists(index_file_path)) {
return Status::Error<ErrorCode::INVERTED_INDEX_FILE_NOT_FOUND>(
"inverted index path: {} not exist.", index_file_path.string());
}

std::unique_ptr<lucene::search::Query> query;
std::wstring field_ws = std::wstring(column_name.begin(), column_name.end());

Expand Down Expand Up @@ -575,12 +569,6 @@ Status StringTypeInvertedIndexReader::query(OlapReaderStatistics* stats,
stats->inverted_index_query_cache_miss++;
}

// check index file existence
if (!indexExists(index_file_path)) {
return Status::Error<ErrorCode::INVERTED_INDEX_FILE_NOT_FOUND>(
"inverted index path: {} not exist.", index_file_path.string());
}

switch (query_type) {
case InvertedIndexQueryType::MATCH_ANY_QUERY:
case InvertedIndexQueryType::MATCH_ALL_QUERY:
Expand Down

0 comments on commit 453c345

Please sign in to comment.