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/10/26 15:31:12 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #38396: [SPARK-40919][SQL][TESTS] Refactor `AnalysisTest#assertAnalysisErrorClass` to avoid wrong check result when `expectedMessageParameters.size <= 4`

MaxGekk commented on code in PR #38396:
URL: https://github.com/apache/spark/pull/38396#discussion_r1005843002


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisTest.scala:
##########
@@ -184,7 +184,7 @@ trait AnalysisTest extends PlanTest {
       }
 
       if (e.getErrorClass != expectedErrorClass ||
-        !e.messageParameters.sameElements(expectedMessageParameters) ||
+        !(e.messageParameters == expectedMessageParameters) ||

Review Comment:
   Let's simplify this and use `!=` instead of combination of `!` and `==`.



-- 
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