hanahmily commented on code in PR #694:
URL: 
https://github.com/apache/skywalking-banyandb/pull/694#discussion_r2251651272


##########
pkg/query/logical/measure/measure_plan_aggregation.go:
##########
@@ -39,18 +39,26 @@ var (
 )
 
 type unresolvedAggregation struct {
-       unresolvedInput  logical.UnresolvedPlan
-       aggregationField *logical.Field
-       aggrFunc         modelv1.AggregationFunction
-       isGroup          bool
+       unresolvedInput         logical.UnresolvedPlan
+       aggregationField        *logical.Field
+       aggrFunc                modelv1.AggregationFunction
+       isGroup                 bool
+       needCompletePushDownAgg bool
 }
 
-func newUnresolvedAggregation(input logical.UnresolvedPlan, aggrField 
*logical.Field, aggrFunc modelv1.AggregationFunction, isGroup bool) 
logical.UnresolvedPlan {
+func newUnresolvedAggregation(
+       input logical.UnresolvedPlan,
+       aggrField *logical.Field,
+       aggrFunc modelv1.AggregationFunction,
+       isGroup bool,
+       needCompletePushDownAgg bool,

Review Comment:
   ```suggestion
   ```
   
   To aggregate a node and access the first field, modify the schema returned 
by distributedPlan.Schema(). The new schema.CreateFieldRef() should produce a 
field that represents the aggregated result.



##########
pkg/query/logical/measure/measure_analyzer.go:
##########
@@ -143,8 +145,13 @@ func DistributedAnalyze(criteria *measurev1.QueryRequest, 
ss []logical.Schema) (
                }
        }
 
+       needCompletePushDownAgg := criteria.GetAgg() != nil &&

Review Comment:
   ```suggestion
          // TODO: to support all aggregation functions
        needCompletePushDownAgg := criteria.GetAgg() != nil &&
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to