Skip to main content

linkrs_query/executor/streaming/operators/spec/
blocking.rs

1//! Immutable configuration for blocking operators.
2
3use crate::executor::streaming::executor::SortDirection;
4use linkrs_core::types::expr::Expression;
5use linkrs_core::types::operators::AggregateFunction;
6
7/// Immutable config for blocking operators.
8#[derive(Debug, Clone)]
9pub enum BlockingSpec {
10    Sort {
11        sort_expressions: Vec<Expression>,
12        sort_directions: Vec<SortDirection>,
13    },
14    Aggregate {
15        group_by_expressions: Vec<Expression>,
16        aggregate_functions: Vec<(AggregateFunction, Vec<Expression>)>,
17        output_col_names: Vec<String>,
18    },
19    GroupBy {
20        group_by_expressions: Vec<Expression>,
21    },
22    WindowFunction {
23        window_exprs: Vec<Expression>,
24        partition_by_exprs: Vec<Expression>,
25        order_by_exprs: Vec<Expression>,
26        order_by_directions: Vec<SortDirection>,
27    },
28    Window {
29        window_exprs: Vec<Expression>,
30        partition_by_exprs: Vec<Expression>,
31        order_by_exprs: Vec<Expression>,
32        order_by_directions: Vec<SortDirection>,
33    },
34    TopN {
35        n: u32,
36        sort_expressions: Vec<Expression>,
37        sort_directions: Vec<SortDirection>,
38    },
39    Distinct,
40    Materialize,
41    DataCollect,
42    RollUpApply {
43        rollup_expressions: Vec<Expression>,
44    },
45    PartialAggregate {
46        group_by_expressions: Vec<Expression>,
47        aggregate_functions: Vec<(AggregateFunction, Vec<Expression>)>,
48        output_col_names: Vec<String>,
49    },
50    FinalAggregate {
51        group_by_expressions: Vec<Expression>,
52        aggregate_functions: Vec<(AggregateFunction, Vec<Expression>)>,
53        output_col_names: Vec<String>,
54    },
55}