bjornjorgensen opened a new pull request, #38773: URL: https://github.com/apache/spark/pull/38773
### What changes were proposed in this pull request? I'm scanning the code with sonar. [This is for python, javascript and css](https://sonarcloud.io/project/issues?resolved=false&id=spark-python). and [this is for java and scala](https://sonarcloud.io/project/issues?resolved=false&id=sparklocal) One of the rools is "[Identical expressions should not be used on both sides of a binary operator.](https://sonarcloud.io/project/issues?languages=py&resolved=false&rules=python%3AS1764&id=spark-python)" There are a lot of this 278 total, in pandas API test code. This PR will remove checks where we compare identical expressions on both sides. ### Why are the changes needed? Using the same value on either side of a binary operator is almost always a mistake. In the case of logical operators, it is either a copy/paste error and therefore a bug, or it is simply wasted code, and should be simplified. In the case of bitwise operators and most binary mathematical operators, having the same value on both sides of an operator yields predictable results, and should be simplified. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org