@@ -47,11 +47,6 @@ pub(crate) fn lower_promql(query: &str, accuracy: AccuracyTarget) -> Rc<Operator
4747// `OperatorNode::new_shared`, so a fixture is exactly what a front end
4848// would hand the planner.
4949
50- use asap_types:: ir:: operator:: AggIntent ;
51- use asap_types:: ir:: operator:: { GroupKeys , Reduction , Source } ;
52- use asap_types:: ir:: schema:: { ColumnId , DataType , Field , Schema } ;
53- use asap_types:: ir:: { apply_materialization_timings, MaterializationAssignment , TimingMemo } ;
54- use asap_types:: ir:: { NonASAPOp , Predicate , ScalarExpr , TimeRangeKind } ;
5550use asap_types:: ir:: operator:: agg_intent:: AggIntent ;
5651use asap_types:: ir:: operator:: operator_properties:: { Reduction , Source } ;
5752use asap_types:: ir:: schema:: { ColumnId , DataType , Field , Schema } ;
@@ -127,86 +122,3 @@ pub(crate) fn agg(
127122) -> Rc < OperatorNode > {
128123 aggregate ( Reduction :: by ( by) , vec ! [ intent] , vec ! [ ] , None , child)
129124}
130-
131- /// `intent without (excluded)`.
132- pub ( crate ) fn without_agg (
133- excluded : Vec < ColumnId > ,
134- intent : AggIntent ,
135- child : Rc < OperatorNode > ,
136- ) -> Rc < OperatorNode > {
137- aggregate (
138- Reduction :: Reduce ( GroupKeys :: without ( excluded) ) ,
139- vec ! [ intent] ,
140- vec ! [ ] ,
141- None ,
142- child,
143- )
144- }
145-
146- /// A per-entity (per-series) single-measure aggregate.
147- pub ( crate ) fn agg_per_entity ( intent : AggIntent , child : Rc < OperatorNode > ) -> Rc < OperatorNode > {
148- aggregate ( Reduction :: PerEntity , vec ! [ intent] , vec ! [ ] , None , child)
149- }
150-
151- pub ( crate ) fn filter ( pred : ScalarExpr , child : Rc < OperatorNode > ) -> Rc < OperatorNode > {
152- OperatorNode :: new_shared ( asap_types:: ir:: Operator :: NonASAP ( NonASAPOp :: Filter {
153- pred : Predicate ( pred) ,
154- child,
155- } ) )
156- . unwrap ( )
157- }
158-
159- pub ( crate ) fn dedup ( cols : Vec < ColumnId > , child : Rc < OperatorNode > ) -> Rc < OperatorNode > {
160- OperatorNode :: new_shared ( asap_types:: ir:: Operator :: NonASAP ( NonASAPOp :: Dedup {
161- cols,
162- child,
163- } ) )
164- . unwrap ( )
165- }
166-
167- /// An explicit range selector `child[range]`.
168- pub ( crate ) fn time_range ( range : Duration , child : Rc < OperatorNode > ) -> Rc < OperatorNode > {
169- OperatorNode :: new_shared ( asap_types:: ir:: Operator :: NonASAP ( NonASAPOp :: TimeRange {
170- range,
171- kind : TimeRangeKind :: Range ,
172- child,
173- } ) )
174- . unwrap ( )
175- }
176-
177- /// `root` timed under the default (every summary at query time)
178- /// assignment — the shape export and the post-ASAP validators consume.
179- pub ( crate ) fn timed ( root : & Rc < OperatorNode > ) -> Rc < OperatorNode > {
180- apply_materialization_timings (
181- root,
182- & MaterializationAssignment :: all_query_time ( ) ,
183- & mut TimingMemo :: new ( ) ,
184- )
185- . expect ( "default materialization timings apply" )
186- }
187-
188- /// `root` timed with every summary maintained at ingestion time.
189- pub ( crate ) fn maintained ( root : & Rc < OperatorNode > ) -> Rc < OperatorNode > {
190- apply_materialization_timings (
191- root,
192- & MaterializationAssignment :: all_ingestion_time ( ) ,
193- & mut TimingMemo :: new ( ) ,
194- )
195- . expect ( "maintained materialization timings apply" )
196- }
197-
198- /// Time `root` under the default materialization assignment (which runs every
199- /// data-state / population-contract check) and export it as a physical ASAP DAG.
200- pub ( crate ) fn time_and_export (
201- root : & Rc < OperatorNode > ,
202- ) -> Result <
203- asap_types:: ir:: physical_export:: PhysicalASAPDAG ,
204- asap_types:: ir:: properties:: ExecutionDataStateError ,
205- > {
206- let timed = apply_materialization_timings (
207- root,
208- & MaterializationAssignment :: all_query_time ( ) ,
209- & mut TimingMemo :: new ( ) ,
210- ) ?;
211- asap_types:: ir:: physical_export:: compile_physical_asap_dag ( & timed)
212- }
0 commit comments