Skip to content

Conversation

@tisonkun
Copy link
Member

We may later build a shared serde utils where deserialize use a cursor like #23 so we can check insufficient data on the fly, and advancing the curosr on reading to avoid hardcode offset.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun marked this pull request as ready for review December 16, 2025 09:15
@tisonkun
Copy link
Member Author

tisonkun commented Dec 16, 2025

cc @notfilippo @freakyzoidberg what do you think? So far, it's OK to let the first 2 or 3 impls uses their own logics but we may later have a generally similar serde workflow.

@notfilippo
Copy link
Contributor

we may later have a generally similar serde workflow.

I think it's fine to wait a couple of sketches to be merged before we start unifying the interface. Might help identifying parallels between different implementations.

Comment on lines +72 to +73
pub use self::estimator::NumStdDev;
pub use self::sketch::HllSketch;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the idea behind this? Do we have tools to enforce this style repo-wide?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it when a mod name sometimes conflicts with a dependency name. Using self::sketch::HllSketch always unambiguously refers to the proper symbol.

Do we have tools to enforce this style repo-wide?

Not quite easy. One can define a custom clippy rule or work with ast-grep. But this rule depends on whether the (pub use) symbol is within this crate/module.

@freakyzoidberg freakyzoidberg merged commit 9e89596 into apache:main Dec 16, 2025
9 checks passed
@tisonkun tisonkun mentioned this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants