HyukjinKwon commented on a change in pull request #30985:
URL: https://github.com/apache/spark/pull/30985#discussion_r550938145



##########
File path: python/pyspark/util.py
##########
@@ -323,6 +323,18 @@ def __del__(self):
                         thread_connection.close()
 
 
+class PySparkWarning(UserWarning):
+    """A base class for PySpark warnings."""
+
+
+class PySparkFutureWarning(PySparkWarning, FutureWarning):
+    """A base class for deprecated PySpark APIs."""
+
+
+class PySparkResourceWarning(PySparkWarning, ResourceWarning):
+    """A base class for PySpark warnings related to resource usage."""

Review comment:
       Hm, what was on my mind was to use directly the built-in warning types 
like `FutureWarning`or `ResourceWarning`. Would you mind explaining this 
exception hierarchy and what we can gain from it?




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

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