(&self, p: AggregateParams)
| 104 | } |
| 105 | |
| 106 | fn plan_aggregate(&self, p: AggregateParams) -> Result<SqlPlan> { |
| 107 | if p.temporal.is_temporal() && !p.bitemporal { |
| 108 | return Err(SqlError::Unsupported { |
| 109 | detail: format!( |
| 110 | "FOR SYSTEM_TIME / FOR VALID_TIME requires a bitemporal \ |
| 111 | collection; '{}' was not created WITH bitemporal = true", |
| 112 | p.collection |
| 113 | ), |
| 114 | }); |
| 115 | } |
| 116 | let base_scan = SqlPlan::Scan { |
| 117 | collection: p.collection, |
| 118 | alias: p.alias, |
| 119 | engine: EngineType::Columnar, |
| 120 | filters: p.filters, |
| 121 | projection: Vec::new(), |
| 122 | sort_keys: Vec::new(), |
| 123 | limit: None, |
| 124 | offset: 0, |
| 125 | distinct: false, |
| 126 | window_functions: Vec::new(), |
| 127 | temporal: p.temporal, |
| 128 | }; |
| 129 | Ok(SqlPlan::Aggregate { |
| 130 | input: Box::new(base_scan), |
| 131 | group_by: p.group_by, |
| 132 | aggregates: p.aggregates, |
| 133 | having: p.having, |
| 134 | limit: p.limit, |
| 135 | grouping_sets: None, |
| 136 | sort_keys: Vec::new(), |
| 137 | }) |
| 138 | } |
| 139 | |
| 140 | fn plan_merge(&self, p: MergeParams) -> Result<Vec<SqlPlan>> { |
| 141 | Err(SqlError::Unsupported { |
nothing calls this directly
no test coverage detected