MCPcopy Create free account
hub / github.com/apache/datafusion / get_histogram

Method get_histogram

datafusion/functions-aggregate/src/hyperloglog.rs:124–131  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

122 /// the histogram; u32 is enough because we only have 2**14=16384 registers
123 #[inline]
124 fn get_histogram(&self) -> [u32; HLL_Q + 2] {
125 let mut histogram = [0; HLL_Q + 2];
126 // hopefully this can be unrolled
127 for r in self.registers {
128 histogram[r as usize] += 1;
129 }
130 histogram
131 }
132
133 /// Merge the other [`HyperLogLog`] into this one
134 pub fn merge(&mut self, other: &HyperLogLog<T>) {

Callers 1

countMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected