You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/02/16 05:00:01 UTC

[GitHub] [druid] leerho edited a comment on issue #12261: Accessing private parts of datasketches

leerho edited a comment 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().getResult()`, the size of the resulting CompactSketch 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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org