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 introduce 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org