mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-10-13 07:12:43 +00:00
@@ -759,9 +759,11 @@ pub(crate) fn build_segment_histogram_collector(
|
||||
children: Vec<AggNode>,
|
||||
) -> crate::Result<Box<dyn SegmentAggregationCollector>> {
|
||||
// Computed sources may change cardinality between blocks.
|
||||
let source_contains_multivalues = req_data.accessor.as_column().map_or(true, |column| {
|
||||
let source_contains_multivalues = if let Some(column) = req_data.accessor.as_column() {
|
||||
column.index.get_cardinality().is_multivalue()
|
||||
});
|
||||
} else {
|
||||
true
|
||||
};
|
||||
if source_contains_multivalues {
|
||||
build_histogram_collector_with_cardinality::<true>(agg_data, req_data, children)
|
||||
} else {
|
||||
|
||||
@@ -353,9 +353,11 @@ pub(crate) fn build_segment_range_collector(
|
||||
children: Vec<AggNode>,
|
||||
) -> crate::Result<Box<dyn SegmentAggregationCollector>> {
|
||||
// Computed sources may change cardinality between blocks.
|
||||
let source_contains_multivalues = req_data.accessor.as_column().map_or(true, |column| {
|
||||
let source_contains_multivalues = if let Some(column) = req_data.accessor.as_column() {
|
||||
column.index.get_cardinality().is_multivalue()
|
||||
});
|
||||
} else {
|
||||
true
|
||||
};
|
||||
if source_contains_multivalues {
|
||||
build_range_collector_with_cardinality::<true>(agg_data, req_data, children)
|
||||
} else {
|
||||
|
||||
@@ -361,7 +361,7 @@ where
|
||||
// we could check always_match_at == Some(0), but this actually gets
|
||||
// inlined into `true` with AlwaysMatch, which is even faster
|
||||
self.automaton
|
||||
.will_always_match(&self.states.first().unwrap()),
|
||||
.will_always_match(self.states.first().unwrap()),
|
||||
self.upper_bound == Bound::Unbounded,
|
||||
) {
|
||||
(true, true) => self.advance_always_match::<true>(),
|
||||
|
||||
Reference in New Issue
Block a user