hoshinojyunn commented on code in PR #64652:
URL: https://github.com/apache/doris/pull/64652#discussion_r3826868230
##########
be/src/storage/segment/vertical_segment_writer.cpp:
##########
@@ -151,8 +151,7 @@ Status
VerticalSegmentWriter::_create_column_writer(uint32_t cid, const TabletCo
opts.need_zone_map = column.is_key() || tablet_schema->keys_type() !=
KeysType::AGG_KEYS;
opts.need_bloom_filter = column.is_bf_column();
if (opts.need_bloom_filter) {
- opts.bf_options.fpp =
- tablet_schema->has_bf_fpp() ?
tablet_schema->bloom_filter_fpp() : 0.05;
+ opts.bf_options.fpp = tablet_schema->get_bloom_filter_fpp(column);
Review Comment:
has_bf_fpp、bloom_filter_fpp指向的是table properties里面的,还是要留着的。
tablet_schema->has_bf_fpp() ? tablet_schema->bloom_filter_fpp()这段逻辑已经删了
##########
be/src/storage/tablet/tablet_schema.cpp:
##########
@@ -1732,6 +1735,30 @@ 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);
+ DORIS_CHECK(parse_result == StringParser::PARSE_SUCCESS)
Review Comment:
In reality, fpp parsing is handled on fe. If parsing fails, fe will throw an
exception. Theoretically, be should not fail to parse; this code is only for
defensive programming.
--
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]