LuciferYang opened a new pull request #30353: URL: https://github.com/apache/spark/pull/30353
### What changes were proposed in this pull request? There are some code like `InstanceOfOption == Some(x)`, for this comparison, we need to wrap `x` as another `Option` instance. In this pr use the `Option.contains` method to simplify the above way and avoid to create new `Option` instance. Before: ``` option == Some(x) Some(x) != option ``` After: ``` option == Some(x) Some(x) != option ``` ### Why are the changes needed? Simplify code and reduce object creation. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass the Jenkins or GitHub Action ---------------------------------------------------------------- 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]
