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


##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -910,13 +912,15 @@ class QueryExecutionErrorsSuite
               }
               exception
             }
-          assert(exceptions.map(e => e.isDefined).reduceLeft(_ || _))
+          // Only check if errors exist to deflake. We couldn't guarantee that
+          // the above 50 runs must hit this error.
           exceptions.map { e =>
             if (e.isDefined) {
               checkError(
                 e.get,
                 errorClass = "CONCURRENT_QUERY",
-                sqlState = Some("0A000")
+                sqlState = Some("0A000"),
+                parameters = e.get.getMessageParameters.asScala.toMap
               )
             }
           }

Review Comment:
   Could you simplify this?
   ```scala
             exceptions.flatten.foreach { e =>
               checkError(
                 e,
                 errorClass = "CONCURRENT_QUERY",
                 sqlState = Some("0A000"),
                 parameters = e.getMessageParameters.asScala.toMap
               )
             }
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to