MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / plan_aggregate

Method plan_aggregate

nodedb-sql/src/engine_rules/kv.rs:99–122  ·  view source on GitHub ↗
(&self, p: AggregateParams)

Source from the content-addressed store, hash-verified

97 }
98
99 fn plan_aggregate(&self, p: AggregateParams) -> Result<SqlPlan> {
100 let base_scan = SqlPlan::Scan {
101 collection: p.collection,
102 alias: p.alias,
103 engine: EngineType::KeyValue,
104 filters: p.filters,
105 projection: Vec::new(),
106 sort_keys: Vec::new(),
107 limit: None,
108 offset: 0,
109 distinct: false,
110 window_functions: Vec::new(),
111 temporal: crate::temporal::TemporalScope::default(),
112 };
113 Ok(SqlPlan::Aggregate {
114 input: Box::new(base_scan),
115 group_by: p.group_by,
116 aggregates: p.aggregates,
117 having: p.having,
118 limit: p.limit,
119 grouping_sets: None,
120 sort_keys: Vec::new(),
121 })
122 }
123
124 fn plan_merge(&self, p: MergeParams) -> Result<Vec<SqlPlan>> {
125 Err(SqlError::Unsupported {

Callers 1

plan_aggregateFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected