leerho commented on issue #12261:
URL: https://github.com/apache/druid/issues/12261#issuecomment-1041106476


   I have added a PR, mentioned just above, to directly address this issue.  It 
will be released with the next Java release which should be relatively soon 
since we also want to release a new KllDoublesSketch, plus a few other things.  
   
   I do respectfully request that you do not lock your "short-term" solution in 
a formal release.  
   
   Please note: the getCurrentBytes() method implemented here as well as in 
your "short-term" solution will only report a different value after the 
internal gadget goes through a resize when the current internal hash table is 
full. In between these resize events this method will return the value from the 
previous resize event.   If you serialize the union via toByteArray() the 
length of the byte array will exactly be the value returned by this method.  It 
also represents (approximately) how much RAM the union is using.  
   
   However, if you do union.toByteArray(union.getResult()), the size will 
generally be much smaller as the union has been "pulled back to K" and 
compacted.  
   
   We don't recommend that you actually serialize the union to either store to 
disk or to transport to another machine because it is so much larger than the 
compact sketch you get when you getResult().  


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