You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/05 14:42:52 UTC

[GitHub] [spark] srowen commented on a diff in pull request #38896: [WIP][SQL] Replace `require()` by an internal error in catalyst

srowen commented on code in PR #38896:
URL: https://github.com/apache/spark/pull/38896#discussion_r1039687033


##########
core/src/main/scala/org/apache/spark/SparkException.scala:
##########
@@ -87,6 +87,16 @@ object SparkException {
       messageParameters = Map("message" -> msg),
       cause = cause)
   }
+
+  /**
+   * Tests an condition, throwing an `SparkException` with
+   * the error class `INTERNAL_ERROR` if false.
+   */
+  def checkInternalError(condition: Boolean, msg: String): Unit = {

Review Comment:
   Is this tiny utility method worth it? not sure



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