In BlockBasedTable::PrefixMayMatch implementation, if rep_->table_prefix_extractor == nullptr and need_upper_bound_check is false, will use prefix_extractor defined in column_family options.
I wonder in what circumstances will this happens.
some code snippet:
bool BlockBasedTable::PrefixMayMatch(
const Slice& internal_key, const ReadOptions& read_options,
const SliceTransform* options_prefix_extractor,
const bool need_upper_bound_check,
BlockCacheLookupContext* lookup_context) const {
if (!rep_->filter_policy) {
return true;
}
const SliceTransform* prefix_extractor;
if (rep_->table_prefix_extractor == nullptr) {
if (need_upper_bound_check) {
return true;
}
prefix_extractor = options_prefix_extractor;
} else {
prefix_extractor = rep_->table_prefix_extractor.get();
}
…
}