Skip to content

Commit d47abdf

Browse files
committed
early cut off for order by sub agg in term agg
1 parent c11952e commit d47abdf

12 files changed

Lines changed: 514 additions & 25 deletions

File tree

src/aggregation/bucket/composite/collector.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,17 @@ impl SegmentAggregationCollector for SegmentCompositeCollector {
199199
}
200200
Ok(())
201201
}
202+
203+
fn compute_metric_value(
204+
&self,
205+
_bucket_id: BucketId,
206+
_sub_agg_name: &str,
207+
_sub_agg_property: &str,
208+
_agg_data: &AggregationsSegmentCtx,
209+
) -> Option<f64> {
210+
// Composite is a multi-bucket agg with no single value to extract.
211+
None
212+
}
202213
}
203214

204215
impl SegmentCompositeCollector {

src/aggregation/bucket/filter.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,17 @@ impl<B: SubAggBuffer> SegmentAggregationCollector for SegmentFilterCollector<B>
674674
}
675675
Ok(())
676676
}
677+
678+
fn compute_metric_value(
679+
&self,
680+
_bucket_id: BucketId,
681+
_sub_agg_name: &str,
682+
_sub_agg_property: &str,
683+
_agg_data: &AggregationsSegmentCtx,
684+
) -> Option<f64> {
685+
// TODO: forward into the inner `sub_agg` for nested order paths (`filter.metric`).
686+
None
687+
}
677688
}
678689

679690
/// Intermediate result for filter aggregation

src/aggregation/bucket/histogram/histogram.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,17 @@ impl SegmentAggregationCollector for SegmentHistogramCollector {
394394
}
395395
Ok(())
396396
}
397+
398+
fn compute_metric_value(
399+
&self,
400+
_bucket_id: BucketId,
401+
_sub_agg_name: &str,
402+
_sub_agg_property: &str,
403+
_agg_data: &AggregationsSegmentCtx,
404+
) -> Option<f64> {
405+
// Histogram is a multi-bucket agg with no single value to extract.
406+
None
407+
}
397408
}
398409

399410
impl SegmentHistogramCollector {

src/aggregation/bucket/range.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,17 @@ impl<B: SubAggBuffer> SegmentAggregationCollector for SegmentRangeCollector<B> {
328328

329329
Ok(())
330330
}
331+
332+
fn compute_metric_value(
333+
&self,
334+
_bucket_id: BucketId,
335+
_sub_agg_name: &str,
336+
_sub_agg_property: &str,
337+
_agg_data: &AggregationsSegmentCtx,
338+
) -> Option<f64> {
339+
// Range is a multi-bucket agg with no single value to extract.
340+
None
341+
}
331342
}
332343
/// Build a concrete `SegmentRangeCollector` with either a Vec- or HashMap-backed
333344
/// bucket storage, depending on the column type and aggregation level.

0 commit comments

Comments
 (0)