Minor clarifications on the AggregationsWithAccessor refacto (#2716)

This commit is contained in:
Remi
2025-10-14 19:59:33 +02:00
committed by GitHub
parent f8e79271ab
commit fc93391d0e
3 changed files with 9 additions and 9 deletions

View File

@@ -1,11 +1,11 @@
use columnar::{Column, ColumnType};
use serde::Serialize;
use crate::aggregation::agg_req::{Aggregation, AggregationVariants, Aggregations};
use crate::aggregation::agg_req_with_accessor::{
use crate::aggregation::accessor_helpers::{
get_all_ff_reader_or_empty, get_dynamic_columns, get_ff_reader, get_missing_val_as_u64_lenient,
get_numeric_or_date_column_types,
};
use crate::aggregation::agg_req::{Aggregation, AggregationVariants, Aggregations};
use crate::aggregation::bucket::{
HistogramAggReqData, HistogramBounds, MissingTermAggReqData, RangeAggReqData,
SegmentHistogramCollector, SegmentRangeCollector, SegmentTermCollector, TermMissingAgg,
@@ -178,11 +178,12 @@ impl AggregationsSegmentCtx {
}
}
/// Each type of aggregation has its own request data struct.
/// This struct holds all request data to execute the aggregation request on a single segment.
/// Each type of aggregation has its own request data struct. This struct holds
/// all request data to execute the aggregation request on a single segment.
///
/// The request tree is represented by `agg_tree` which contains nodes with references
/// into the various request ata vectors.
/// The request tree is represented by `agg_tree`. Tree nodes contain the index
/// of their context in corresponding request data vector (e.g. `term_req_data`
/// for a node with [AggKind::Terms]).
#[derive(Default)]
pub struct PerRequestAggSegCtx {
// Box for cheap take/put - Only necessary for bucket aggs that have sub-aggregations
@@ -352,6 +353,7 @@ pub(crate) fn build_segment_agg_collector(
}
}
/// See [PerRequestAggSegCtx]
#[derive(Debug, Clone)]
pub struct AggRefNode {
pub kind: AggKind,
@@ -395,8 +397,6 @@ impl AggKind {
}
}
// ReqData structs moved to their respective collector modules
/// Build AggregationsData by walking the request tree.
pub(crate) fn build_aggregations_data_from_req(
aggs: &Aggregations,

View File

@@ -127,10 +127,10 @@
//! [`AggregationResults`](agg_result::AggregationResults) via the
//! [`into_final_result`](intermediate_agg_result::IntermediateAggregationResults::into_final_result) method.
mod accessor_helpers;
mod agg_data;
mod agg_limits;
pub mod agg_req;
mod agg_req_with_accessor;
pub mod agg_result;
pub mod bucket;
mod buf_collector;