private void transferAggregatorsRecursively(PlanNode planNode, DistributionPlanContext context) {
    List<AggregationDescriptor> descriptorList = getAggregationDescriptors(planNode);
    if (descriptorList != null) {
      for (AggregationDescriptor descriptor : descriptorList) {
        descriptor.setStep(
            planNode instanceof SlidingWindowAggregationNode
                ? AggregationStep.INTERMEDIATE
                : AggregationStep.PARTIAL);
        updateTypeProviderByPartialAggregation(descriptor, context.queryContext.getTypeProvider());
      }
    }
    planNode.getChildren().forEach(child -> transferAggregatorsRecursively(child, context));
  }
aggregation align by device, and aggregation is `count_if` or `diff`, or aggregation used with
group by parameter (session, variation, count), use the old aggregation logic
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/SourceRewriter.java