You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/23 14:07:30 UTC

[GitHub] [spark] bjornjorgensen opened a new pull request, #38773: [SPARK-41016][PANDAS ON SPARK API] Identical expressions should not be used on both sides of a binary operator

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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] bjornjorgensen closed pull request #38773: [SPARK-41016][PS] Identical expressions should not be used on both sides of a binary operator

Posted by GitBox <gi...@apache.org>.
bjornjorgensen closed pull request #38773: [SPARK-41016][PS] Identical expressions should not be used on both sides of a binary operator
URL: https://github.com/apache/spark/pull/38773


-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #38773: [SPARK-41016][PS] Identical expressions should not be used on both sides of a binary operator

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on PR #38773:
URL: https://github.com/apache/spark/pull/38773#issuecomment-1327384551

   Can one of the admins verify this patch?


-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org