use crate::db::{direction::Direction, query::plan::AggregateKind};
#[must_use]
pub(in crate::db::executor) const fn aggregate_extrema_direction(
kind: AggregateKind,
) -> Option<Direction> {
kind.extrema_direction()
}
#[must_use]
pub(in crate::db::executor) const fn aggregate_materialized_fold_direction(
kind: AggregateKind,
) -> Direction {
kind.materialized_fold_direction()
}
#[must_use]
pub(in crate::db::executor) const fn aggregate_supports_bounded_probe_hint(
kind: AggregateKind,
) -> bool {
kind.supports_bounded_probe_hint()
}
#[must_use]
pub(in crate::db::executor) fn aggregate_bounded_probe_fetch_hint(
kind: AggregateKind,
direction: Direction,
offset: usize,
page_limit: Option<usize>,
) -> Option<usize> {
kind.bounded_probe_fetch_hint(direction, offset, page_limit)
}