cryptoe commented on code in PR #12862:
URL: https://github.com/apache/druid/pull/12862#discussion_r939882900


##########
processing/src/main/java/org/apache/druid/query/aggregation/AggregatorFactory.java:
##########
@@ -347,6 +350,21 @@ public AggregatorFactory 
optimizeForSegment(PerSegmentQueryOptimizationContext o
     return this;
   }
 
+  /**
+   * Used in cases where we want to change the output name of the aggregator 
to something else. For eg: if we have
+   * a query "select a , sum(b) as total group by table" the aggregator 
returned from the native group by query is "a0" set in
+   * {@link org.apache.druid.sql.calcite.rel.DruidQuery#computeAggregations}. 
We can use withName("total") to set the output name
+   * of the aggregator to "total".
+   *
+   * @param newName newName of the output for aggregator factory
+   * @return AggregatorFactory with the output name set as the input param.
+   */
+  @SuppressWarnings("unused")
+  public AggregatorFactory withName(String newName)

Review Comment:
   Thanks for the catch. Updated the java docs. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to