tisonkun commented on issue #391: URL: https://github.com/apache/datasketches-rust/issues/391#issuecomment-7031519435
Thanks for raising this and linking the Ballista PR for context. Our HLL implementation natively hashes values with 128-bit MurmurHash3 (`(lo, hi)` for slot and leading zeros). A single-`u64` `Coupon::from_hash` would introduce a second, incompatible hash-to-coupon mapping that cannot merge with `from_value` or other DataSketches implementations, while a two-`u64` variant wouldn't fit single-`u64` outputs like DataFusion's `create_hashes`. Looking at apache/datafusion-ballista#2868, `create_hashes` seems to be called specifically for HLL rather than reusing hashes computed elsewhere. A cleaner path upstream might be downcasting common Arrow array types directly to `HllSketch::update` (with `RowConverter` as a fallback for nested types), which avoids the second hash and intermediate `Vec<u64>` buffer while staying compatible with standard DataSketches HLL (and pairs well with the update-path optimizations in #385). Happy to hear your thoughts, and feel free to share a bit more context if you still have a use case that needs a precomputed-hash constructor. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
