hannahkamundson commented on code in PR #44336:
URL: https://github.com/apache/spark/pull/44336#discussion_r1425757933
##########
common/utils/src/main/scala/org/apache/spark/SparkException.scala:
##########
@@ -106,6 +106,20 @@ object SparkException {
messageParameters = Map("message" -> msg),
cause = cause)
}
+
+ /**
+ * This is like the Scala require precondition, except it uses
SparkException.
+ * @param requirement The requirement you want to check
+ * @param errorClass The error class to type if the requirement isn't passed
+ * @param messageParameters Message parameters to append to the message
+ */
+ def sparkRequire(requirement: Boolean,
Review Comment:
Done!
--
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]