In a sense. We are given a slot in a buffer, and we need to initialize an 
aggregation object there. Our sketches have a special mode for this (so called 
"direct" as opposed to "heap"). In this case the Union constructor is given a 
chunk of memory to occupy. It will initialize a few things there so that later 
this chunk can be "wrapped" (quickly interpreted as a Union object) and updated:
Union union = Union.writableWrap(mem);
union.update(sketch);
In this mode it is not necessary to keep the constructed object around because 
it is cheap to reconstruct from the chunk of memory using the "wrapping" 
operation. Perhaps I should add a comment in the code to explain this.

[ Full content available at: 
https://github.com/apache/incubator-druid/pull/5712 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to