uqa_execution/aggregation/
mod.rs1use std::cmp::Ordering;
10use std::io::{BufRead, BufReader, BufWriter, Seek, SeekFrom, Write};
11use std::sync::Arc;
12use uqa_storage::temporary_file::TemporaryFile as File;
13
14use crate::{eval_scalar, ScalarEvalContext, ScalarExpr, ScalarOrder, SpillBuffer};
15use uqa_core::{DecimalValue, Value};
16use uqa_sql::expr::cast_value;
17use uqa_sql::plan::QueryBlockPlan;
18use uqa_sql::{SQLError, SQLParam};
19
20use crate::functions::{SQLAggregateFactory, SQLAggregateState};
21
22use crate::scalar::plan::{PlanSubqueryArena, QueryExpressionContext};
23use uqa_sql::expr::core_value_to_json;
24
25const AGGREGATE_MERGE_FAN_IN: usize = 16;
26
27mod accumulator;
28mod adaptive;
29mod analysis;
30mod array_inputs;
31mod distinct;
32mod executor;
33mod finalize;
34mod observation;
35mod ordering;
36mod output;
37mod partial_state;
38mod projected;
39mod projected_input;
40mod registered_buffer;
41mod rewrite;
42mod sort_fallback;
43pub(crate) mod state;
44mod string_agg;
45mod template;
46mod value_buffer;
47
48pub use accumulator::*;
49pub use analysis::*;
50pub use distinct::*;
51pub use executor::PhysicalAggregateExecutor;
52pub use finalize::*;
53pub use ordering::compare_extrema;
54pub(crate) use output::outer::AggregateOuterRow;
55pub use registered_buffer::*;
56pub use rewrite::*;
57pub use template::AggregateAccumulatorTemplate;
58pub use value_buffer::*;
59
60#[cfg(test)]
61mod tests;