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

Method plan_aggregate

nodedb-sql/src/engine_rules/timeseries.rs:93–116  ·  view source on GitHub ↗
(&self, p: AggregateParams)

Source from the content-addressed store, hash-verified

91 }
92
93 fn plan_aggregate(&self, p: AggregateParams) -> Result<SqlPlan> {
94 if p.temporal.is_temporal() && !p.bitemporal {
95 return Err(SqlError::Unsupported {
96 detail: format!(
97 "FOR SYSTEM_TIME / FOR VALID_TIME requires a bitemporal \
98 timeseries collection; '{}' was not created WITH bitemporal = true",
99 p.collection
100 ),
101 });
102 }
103 Ok(SqlPlan::TimeseriesScan {
104 collection: p.collection,
105 time_range: default_time_range(),
106 bucket_interval_ms: p.bucket_interval_ms.unwrap_or(0),
107 group_by: p.group_columns,
108 aggregates: p.aggregates,
109 filters: p.filters,
110 projection: Vec::new(),
111 gap_fill: String::new(),
112 limit: p.limit,
113 tiered: p.has_auto_tier,
114 temporal: p.temporal,
115 })
116 }
117
118 fn plan_merge(&self, p: MergeParams) -> Result<Vec<SqlPlan>> {
119 Err(SqlError::Unsupported {

Callers

nothing calls this directly

Calls 2

default_time_rangeFunction · 0.85
is_temporalMethod · 0.80

Tested by

no test coverage detected