hoshinojyunn commented on code in PR #64652:
URL: https://github.com/apache/doris/pull/64652#discussion_r3585738449
##########
be/src/storage/tablet/tablet_schema.cpp:
##########
@@ -1849,6 +1851,31 @@ const TabletIndex*
TabletSchema::get_ngram_bf_index(int32_t col_unique_id) const
return nullptr;
}
+double TabletSchema::get_bloom_filter_fpp(int32_t col_unique_id) const {
+ const auto* bloom_filter_index = get_index(col_unique_id,
IndexType::BLOOMFILTER, "");
+ if (bloom_filter_index != nullptr) {
+ const auto& properties = bloom_filter_index->properties();
+ auto iter = properties.find("bloom_filter_fpp");
+ if (iter != properties.end()) {
+ StringParser::ParseResult parse_result =
StringParser::PARSE_FAILURE;
+ auto index_level_fpp = StringParser::string_to_float<Float64>(
+ iter->second.data(), iter->second.size(), &parse_result);
+ if (parse_result != StringParser::PARSE_SUCCESS) {
+ return Status::InvalidArgument("failed to parse '{}' as
double", iter->second);
+ }
Review Comment:
In fact, the FE already performs parsing and validation on the fpp, and
invalid fpps will not be passed to the BE. A better solution here would be to
add a check.
--
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]