mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 09:08:43 +08:00
fix: fix LoadMetrics bool type error (#45209)
#44584 Signed-off-by: thekingking <1677273255@qq.com>
This commit is contained in:
parent
0cc79772e7
commit
e25ee08566
@ -1062,7 +1062,7 @@ class SkipIndexStatsBuilder {
|
||||
}
|
||||
return std::make_unique<BooleanFieldChunkMetrics>(
|
||||
info.contains_true_, info.contains_false_);
|
||||
}
|
||||
} else {
|
||||
T min, max;
|
||||
if constexpr (std::is_same_v<T, std::string>) {
|
||||
min = std::string(info.min_);
|
||||
@ -1079,7 +1079,8 @@ class SkipIndexStatsBuilder {
|
||||
return std::make_unique<StringFieldChunkMetrics>(
|
||||
min, max, nullptr, nullptr);
|
||||
}
|
||||
return std::make_unique<IntFieldChunkMetrics<T>>(min, max, nullptr);
|
||||
return std::make_unique<IntFieldChunkMetrics<T>>(
|
||||
min, max, nullptr);
|
||||
}
|
||||
BloomFilterPtr bloom_filter =
|
||||
NewBloomFilterWithType(info.unique_values_.size(),
|
||||
@ -1093,8 +1094,8 @@ class SkipIndexStatsBuilder {
|
||||
return std::make_unique<StringFieldChunkMetrics>(
|
||||
min, max, std::move(bloom_filter), nullptr);
|
||||
}
|
||||
BloomFilterPtr ngram_bloom_filter =
|
||||
NewBloomFilterWithType(info.ngram_values_.size(),
|
||||
BloomFilterPtr ngram_bloom_filter = NewBloomFilterWithType(
|
||||
info.ngram_values_.size(),
|
||||
DEFAULT_BLOOM_FILTER_FALSE_POSITIVE_RATE,
|
||||
BFType::Blocked);
|
||||
for (const auto& ngram : info.ngram_values_) {
|
||||
@ -1114,6 +1115,7 @@ class SkipIndexStatsBuilder {
|
||||
return std::make_unique<IntFieldChunkMetrics<T>>(
|
||||
min, max, std::move(bloom_filter));
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
bool enable_bloom_filter_ = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user