-
Notifications
You must be signed in to change notification settings - Fork 36
feat(req): port of reqsketch-rs #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,7 @@ countmin = [] | |
| cpc = [] | ||
| frequencies = [] | ||
| hll = [] | ||
| req = ["dep:rand"] | ||
| tdigest = [] | ||
| theta = [] | ||
| tuple = [] | ||
|
|
@@ -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" | ||
|
|
@@ -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 } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
.. and we may need one more test lib. But you can leave it to me to do a global alignment. |
||
| googletest = { workspace = true } | ||
| insta = { workspace = true } | ||
| proptest = { workspace = true } | ||
|
|
||
| [lints] | ||
| workspace = true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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, | ||
|
Comment on lines
+88
to
+89
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From datasketches-java, these fields are: REQ(17, "REQ", 1 /* minPreLongs */, 2 /* maxPreLongs */),But we don't use these fields for REQSketch anyway. |
||
| }; | ||
|
|
||
| /// CountMin Sketch | ||
| #[cfg(feature = "countmin")] | ||
| pub const COUNTMIN: Family = Family { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be relevant to #203.
cc @jeffoodchain
We may use
randas a starting point and conclude before the next release.