dataroaring commented on code in PR #48965:
URL: https://github.com/apache/doris/pull/48965#discussion_r2000050771
##########
be/src/olap/rowset/segment_v2/inverted_index_reader.cpp:
##########
@@ -410,11 +410,19 @@ Status StringTypeInvertedIndexReader::query(const
io::IOContext* io_ctx,
// If the written value exceeds ignore_above, it will be written as null.
// The queried value exceeds ignore_above means the written value cannot
be found.
// The query needs to be downgraded to read from the segment file.
- if (int ignore_above =
+ try {
+ int ignore_above =
std::stoi(get_parser_ignore_above_value_from_properties(_index_meta.properties()));
- act_len > ignore_above) {
- return Status::Error<ErrorCode::INVERTED_INDEX_EVALUATE_SKIPPED>(
- "query value is too long, evaluate skipped.");
+ if (act_len > ignore_above) {
+ return Status::Error<ErrorCode::INVERTED_INDEX_EVALUATE_SKIPPED>(
+ "query value is too long, evaluate skipped.");
+ }
+ } catch (const std::invalid_argument& e) {
+ LOG(WARNING) << "Invalid ignore_above value: "
+ << ", error: " << e.what();
+ } catch (const std::out_of_range& e) {
+ LOG(WARNING) << "ignore_above value out of range: "
+ << ",error: " << e.what();
Review Comment:
Maybe we should return an error.
--
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]