You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/05/01 10:25:21 UTC
[GitHub] [spark] MaxGekk commented on a diff in pull request #40817: [SPARK-42845][SQL] Update the error class _LEGACY_ERROR_TEMP_2010 to InternalError
MaxGekk commented on code in PR #40817:
URL: https://github.com/apache/spark/pull/40817#discussion_r1181501150
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -388,10 +388,9 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase {
)
}
- def mergeUnsupportedByWindowFunctionError(): SparkUnsupportedOperationException = {
- new SparkUnsupportedOperationException(
- errorClass = "_LEGACY_ERROR_TEMP_2010",
- messageParameters = Map.empty)
+ def mergeUnsupportedByWindowFunctionError(): Throwable = {
+ SparkException.internalError(
+ s"""Aggregate Window Functions do not support merging.""")
Review Comment:
Could you use " instead of """
and please, add the function name. How about:
```suggestion
s"The aggregate window function ${toSQLId(funcName)} does not support merging.")
```
Pass the function name:
```scala
override lazy val mergeExpressions =
throw QueryExecutionErrors.mergeUnsupportedByWindowFunctionError(prettyName)
```
--
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