zhengruifeng opened a new pull request #31394: URL: https://github.com/apache/spark/pull/31394
### What changes were proposed in this pull request? Currently, a hashing vector generated by `hashFunction` only has one elements. This attribute can be used for optimization: 1, for `BucketedRandomProjectionLSH`, in a pair, if two vectors have the same value, `hashDistance` can directly return 0.0; 2, for `MinHashLSH`, in a pair, if two vectors have different values, `hashDistance` can directly return 1.0; ### Why are the changes needed? it should be faster than existing impl, because of short-circuit ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? existing testsuites ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
