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/11/01 07:39:22 UTC

[GitHub] [spark] itholic commented on a diff in pull request #38170: [WIP][SPARK-40663][SQL] Migrate execution errors onto error classes: _LEGACY_ERROR_TEMP_2201-2225

itholic commented on code in PR #38170:
URL: https://github.com/apache/spark/pull/38170#discussion_r1010170342


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -2171,11 +2168,7 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase {
   }
 
   def noSuchElementExceptionError(key: String): Throwable = {
-    new SparkException(
-      errorClass = "_LEGACY_ERROR_TEMP_2221",
-      messageParameters = Map(
-        "key" -> key),
-      cause = null)
+    new NoSuchElementException(key)

Review Comment:
   Seems like we cannot just simply treat `key` for `NoSuchElementException` as same as message in error class.
   
   I think maybe we need to new Exception something like `SparkNoSuchElementException`.
   
   Let me just revert for now, and will open a PR for new Exception, and cover the missing cases here.



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