imply-cheddar opened a new pull request, #13737:
URL: https://github.com/apache/druid/pull/13737

   HllSketchAggregatorFactory.combine had been implemented using a pure 
pair-wise, "make a union -> add 2 things to union -> get sketch" algorithm.  
This algorithm does 2 things that was CPU
   
   1) The Union object always builds an HLL_8 sketch regardless of the
     target type.  This means that when the target type is not HLL_8, we
     spent CPU cycles converting to HLL_8 and back over and over again
   2) By throwing away the Union object and converting back to the
     HllSketch only to build another Union object, we do lots and lots
     of copy+conversions of the HllSketch
   
   This change introduces an HllSketchHolder object which can hold onto a Union 
object and delay conversion back into an HllSketch until it is actually needed. 
 This follows the same pattern as the SketchHolder object for theta sketches.
   
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.


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