abhishekagarwal87 commented on a change in pull request #10304:
URL: https://github.com/apache/druid/pull/10304#discussion_r478280502



##########
File path: 
extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramBufferAggregator.java
##########
@@ -28,54 +28,30 @@
 public class ApproximateHistogramBufferAggregator implements BufferAggregator
 {
   private final BaseFloatColumnValueSelector selector;
-  private final int resolution;
+  private final ApproximateHistogramBufferAggregatorInternal innerAggregator;

Review comment:
       Yes but decided against it as static methods are not so good when it 
comes to unit testing. I can pass mock dependencies in the constructor, unlike 
the static methods. Then, some classes also have temporary buffers as a state 
which I can put inside the instances with common functionality. E.g. 
`ApproximateHistogramFoldingBufferAggregatorInternal`  has temporary buffers 
created just once.  I could make these temp buffers static too but then 
synchronization issues kick in. 




----------------------------------------------------------------
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.

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