Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What changes were proposed in this pull request? The proposed changes in this pr involve refactoring the method of creating a `Hasher[T]` instance in the code. The original code used a series of if-else statements to check the class type of `T` and create the corresponding `Hasher[T]` instance. The proposed change simplifies this process by using Scala's pattern matching feature. The new code is more concise and easier to read. ### Why are the changes needed? The changes are needed for several reasons. Firstly, the use of pattern matching makes the code more idiomatic to Scala, which is beneficial for readability and maintainability. Secondly, the original code contains a comment about a bug in the Scala 2.9.x compiler that prevented the use of pattern matching in this context. However, Apache Spark 4.0 has switched to using Scala 2.13, and the new code has passed all tests, it appears that the bug no longer exists in the new version of Scala. Lastly, the change reduces the amount of code and makes it cleaner and easier to understand. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #44998 from LuciferYang/openhashset-hasher. Lead-authored-by: yangjie01 <[email protected]> Co-authored-by: YangJie <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
- Loading branch information