You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datasketches.apache.org by "leerho (via GitHub)" <gi...@apache.org> on 2025/12/16 01:29:01 UTC
[I] Sketch naming (datasketches-rust)
leerho opened a new issue, #22:
URL: https://github.com/apache/datasketches-rust/issues/22
### Align public sketch class names so that the sketch family name is part of the class/file name.
With the recent release of DS-Java 9.0.0 on Java 25, we did a major overhaul of the sketch naming conventions because over time as the library grew, we had inadvertently created name collisions.
I don't know how this works in Rust, but the fact that the "main 'HllSketch' struct and primary interface" is called "sketch.rs" caught my eye. See [Java Release Tag 9.0.0](https://github.com/apache/datasketches-java/releases/tag/9.0.0).
I would suggest renaming the file to hll_sketch.rs or something similar (following Rust conventions) to avoid future name collisions in documentation and in code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Sketch naming (datasketches-rust)
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #22:
URL: https://github.com/apache/datasketches-rust/issues/22#issuecomment-3658358215
> is called "sketch.rs"
This is an internal naming. The final user-facing API is (you can test it by cloning this repo and run `RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps --open`):
* Structs
* `hll::HllSketch`
* Enums
* `error::SerdeError`
* `hll::HllType`
* `hll::NumStdDev`
I'm reading the Java Release Note to understand what is expected finally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Sketch naming (datasketches-rust)
Posted by "leerho (via GitHub)" <gi...@apache.org>.
leerho commented on issue #22:
URL: https://github.com/apache/datasketches-rust/issues/22#issuecomment-3663035924
If it is strictly an internal name, it should't be an issue. (I'm not used to reading Rust, my issue!)
Historically in Java over the years we had inadvertently created public name conflicts across some of the sketches. If you are using only one sketch it is not an issue, but if you wanted to use two sketches in the same class that happened to have public name conflicts, one of the sketches had to be fully qualified on every use, P.I.T.A. :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Sketch naming (datasketches-rust)
Posted by "leerho (via GitHub)" <gi...@apache.org>.
leerho closed issue #22: Sketch naming
URL: https://github.com/apache/datasketches-rust/issues/22
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Sketch naming (datasketches-rust)
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #22:
URL: https://github.com/apache/datasketches-rust/issues/22#issuecomment-3663161598
> If it is strictly an internal name, it should't be an issue. (I'm not used to reading Rust, my issue!)
>
> Historically in Java over the years we had inadvertently created public name conflicts across some of the sketches. If you are using only one sketch it is not an issue, but if you wanted to use two sketches in the same class that happened to have public name conflicts, one of the sketches had to be fully qualified on every use, P.I.T.A. :)
I know this issue. It happened when I developed Apache Flink, and we started to fight with Hadoop's `FileSystem` and so many other `FileSystem`s. IIRC, there are some other things like communicating between the shaded names and the original names. (My Rust code percentage goes over the Java part starting from this year, lol.)
On Scala, Rust, etc., the language allows you to partially import the module name, so even if you have:
```rust
pub mod hll { pub struct Sketch }
pub mod kll { pub struct Sketch }
```
It's possible to do:
```rust
use datasketches::hll;
use datasketches::kll;
// use hll::Sketch ...
// use kll::Sketch ...
```
But anyway our exported names are `HllSketch` already.
The remaining issue can be some developers could complain similar file names can make searching code in IDE a bit harder (consider all your results are `mod.rs`/`lib.rs`/`sketch.rs` so you need extra prefix qualifier to know who it excatly is). But this is something about internal dev experience. Also `hll/hll.rs` would cause [`clippy::module_inception`](https://rust-lang.github.io/rust-clippy/master/index.html#module_inception).
Naming is hard 🤷🏻♂️
N.B. This issue can be closed as not an issue, IMO.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Sketch naming (datasketches-rust)
Posted by "notfilippo (via GitHub)" <gi...@apache.org>.
notfilippo commented on issue #22:
URL: https://github.com/apache/datasketches-rust/issues/22#issuecomment-3665787622
> N.B. This issue can be closed as not an issue, IMO.
👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Sketch naming (datasketches-rust)
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #22:
URL: https://github.com/apache/datasketches-rust/issues/22#issuecomment-3658988281
Looks like mainly about not using `Sketch` itself as the public symbol name. `hll:HllSketch` should be fine following this new idiom, I think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org