You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "amaliujia (via GitHub)" <gi...@apache.org> on 2023/04/06 00:04:38 UTC

[GitHub] [spark] amaliujia commented on a diff in pull request #40672: [SPARK-43035][CONNECT] Add error class in Spark Connect server's ErrorInfo

amaliujia commented on code in PR #40672:
URL: https://github.com/apache/spark/pull/40672#discussion_r1159156260


##########
python/pyspark/errors/exceptions/base.py:
##########
@@ -31,14 +31,12 @@ def __init__(
         error_class: Optional[str] = None,
         message_parameters: Optional[Dict[str, str]] = None,
     ):
-        # `message` vs `error_class` & `message_parameters` are mutually exclusive.
-        assert (message is not None and (error_class is None and message_parameters is None)) or (
-            message is None and (error_class is not None and message_parameters is not None)
-        )
-
-        self.error_reader = ErrorClassesReader()
-
         if message is None:
+            assert (

Review Comment:
   we are losing the assert on `message is not None and (error_class is None and message_parameters is None)`?



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