Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 186 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ rust-version = "1.86.0"
datasketches = { path = "datasketches" }

# Crates.io dependencies
approx = { version = "0.5" }
clap = { version = "4.6.5", features = ["derive"] }
insta = { version = "1.48.0" }
googletest = { version = "0.14.3" }
insta = { version = "1.48.0" }
cargo_metadata = { version = "0.23.1" }
proptest = { version = "1" }
rand = { version = "0.9.2" }
which = { version = "8.0.5" }
flate2 = { version = "1.1.9", default-features = false, features = ["zlib-rs"] }
tar = { version = "0.4.46", default-features = false }
Expand Down
11 changes: 11 additions & 0 deletions datasketches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ countmin = []
cpc = []
frequencies = []
hll = []
req = ["dep:rand"]
tdigest = []
theta = []
tuple = []
Expand Down Expand Up @@ -72,6 +73,11 @@ name = "hll_test"
path = "tests/hll_test/main.rs"
required-features = ["hll"]

[[test]]
name = "req_test"
path = "tests/req_test/main.rs"
required-features = ["req"]

[[test]]
name = "tdigest_test"
path = "tests/tdigest_test/main.rs"
Expand All @@ -87,9 +93,14 @@ name = "tuple_test"
path = "tests/tuple_test/main.rs"
required-features = ["tuple"]

[dependencies]
rand = { workspace = true, optional = true }

[dev-dependencies]
approx = { workspace = true }
googletest = { workspace = true }
insta = { workspace = true }
proptest = { workspace = true }

[lints]
workspace = true
9 changes: 9 additions & 0 deletions datasketches/src/codec/family.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ impl Family {
max_pre_longs: 5,
};

/// Relative Error Quantiles (REQ) sketch.
#[cfg(feature = "req")]
pub const REQ: Family = Family {
id: 17,
name: "REQ",
min_pre_longs: 2,
max_pre_longs: 4,
};

/// CountMin Sketch
#[cfg(feature = "countmin")]
pub const COUNTMIN: Family = Family {
Expand Down
2 changes: 2 additions & 0 deletions datasketches/src/codec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub use self::encode::SketchBytes;
feature = "cpc",
feature = "frequencies",
feature = "hll",
feature = "req",
feature = "tdigest",
feature = "theta",
feature = "tuple",
Expand All @@ -41,6 +42,7 @@ pub(crate) mod assert;
feature = "cpc",
feature = "frequencies",
feature = "hll",
feature = "req",
feature = "tdigest",
feature = "theta",
feature = "tuple",
Expand Down
2 changes: 2 additions & 0 deletions datasketches/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ pub mod cpc;
pub mod frequencies;
#[cfg(feature = "hll")]
pub mod hll;
#[cfg(feature = "req")]
pub mod req;
#[cfg(feature = "tdigest")]
pub mod tdigest;
#[cfg(any(feature = "theta", feature = "tuple"))]
Expand Down
Loading