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


##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala:
##########
@@ -2638,10 +2638,14 @@ class SQLQuerySuite extends QueryTest with 
SharedSparkSession with AdaptiveSpark
 
   test("SPARK-20164: ExtendedAnalysisException should be tolerant to null 
query plan") {
     try {
-      throw new ExtendedAnalysisException("", None, None, plan = null)
+      throw new ExtendedAnalysisException(
+        new AnalysisException(
+          errorClass = "_LEGACY_ERROR_USER_RAISED_EXCEPTION",
+          messageParameters = Map("errorMessage" -> "null query plan")),
+        plan = null)
     } catch {
       case ae: ExtendedAnalysisException =>
-        assert(ae.plan == null && ae.getMessage == ae.getSimpleMessage)
+        assert(ae.plan == None && ae.getMessage == ae.getSimpleMessage)

Review Comment:
   `isEmpty` is better probably. I will change this when I will address other 
comments in the PR.



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