Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordworms committed Jun 10, 2024
1 parent 330f2ac commit 929da68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion datafusion/functions-aggregate/src/hyperloglog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! `hyperloglog` is a module that contains a modified version
//! of [redis's implementation](https://github.com/redis/redis/blob/4930d19e70c391750479951022e207e19111eb55/src/hyperloglog.c)
//! with some modification based on strong assumption of usage
//! within datafusion, so that [`datafusion_functions_aggregate::approx_distinct`] function can
//! within datafusion, so that [`approx_distinct`] function can
//! be efficiently implemented.
//!
//! Specifically, like Redis's version, this HLL structure uses
Expand Down
5 changes: 3 additions & 2 deletions datafusion/physical-expr/src/aggregate/hyperloglog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ where

/// Get the register histogram (each value in register index into
/// the histogram; u32 is enough because we only have 2**14=16384 registers
#[warn(dead_code)]
#[allow(dead_code)]
#[inline]
fn get_histogram(&self) -> [u32; HLL_Q + 2] {
let mut histogram = [0; HLL_Q + 2];
Expand All @@ -127,7 +127,7 @@ where
}

/// Merge the other [`HyperLogLog`] into this one
#[warn(dead_code)]
#[allow(dead_code)]
pub fn merge(&mut self, other: &HyperLogLog<T>) {
assert!(
self.registers.len() == other.registers.len(),
Expand Down Expand Up @@ -181,6 +181,7 @@ fn hll_sigma(x: f64) -> f64 {
/// Helper function tau as defined in
/// "New cardinality estimation algorithms for HyperLogLog sketches"
/// Otmar Ertl, arXiv:1702.01284
#[allow(dead_code)]
#[inline]
fn hll_tau(x: f64) -> f64 {
if x == 0.0 || x == 1.0 {
Expand Down

0 comments on commit 929da68

Please sign in to comment.