@@ -7,10 +7,10 @@ use promql_utilities::query_logics::enums::{AggregationType, QueryTreatmentType,
77
88use crate :: config:: input:: SketchParameterOverrides ;
99use crate :: error:: ControllerError ;
10- use crate :: planner:: sketch:: build_sketch_parameters;
11- use crate :: planner:: window:: IntermediateWindowConfig ;
1210use crate :: planner:: agg_config:: { build_agg_configs_for_statistics, IntermediateAggConfig } ;
1311use crate :: planner:: cleanup:: get_sql_cleanup_param;
12+ use crate :: planner:: sketch:: build_sketch_parameters;
13+ use crate :: planner:: window:: IntermediateWindowConfig ;
1414use crate :: StreamingEngine ;
1515
1616pub struct ElasticSingleQueryProcessor {
@@ -126,7 +126,10 @@ fn get_elastic_statistics(
126126 match agg_type {
127127 ElasticAggregationType :: Avg => {
128128 // AVG requires SUM and COUNT
129- Ok ( ( QueryTreatmentType :: Exact , vec ! [ Statistic :: Sum , Statistic :: Count ] ) )
129+ Ok ( (
130+ QueryTreatmentType :: Exact ,
131+ vec ! [ Statistic :: Sum , Statistic :: Count ] ,
132+ ) )
130133 }
131134 ElasticAggregationType :: Sum => Ok ( ( QueryTreatmentType :: Approximate , vec ! [ Statistic :: Sum ] ) ) ,
132135 ElasticAggregationType :: Min => Ok ( ( QueryTreatmentType :: Exact , vec ! [ Statistic :: Min ] ) ) ,
@@ -145,7 +148,9 @@ fn get_elastic_statistics(
145148}
146149
147150/// Extract field names from group by specification
148- fn get_group_by_fields ( bucket_spec : & elastic_dsl_utilities:: ast_parsing:: GroupBySpec ) -> Vec < String > {
151+ fn get_group_by_fields (
152+ bucket_spec : & elastic_dsl_utilities:: ast_parsing:: GroupBySpec ,
153+ ) -> Vec < String > {
149154 use elastic_dsl_utilities:: ast_parsing:: GroupBySpec ;
150155 match bucket_spec {
151156 GroupBySpec :: Fields ( fields) => fields. clone ( ) ,
0 commit comments