[SPARK-42845][SQL] Update the error class _LEGACY_ERROR_TEMP_2010 to InternalError#40817
[SPARK-42845][SQL] Update the error class _LEGACY_ERROR_TEMP_2010 to InternalError#40817liang3zy22 wants to merge 2 commits intoapache:masterfrom
Conversation
|
I can't find a method to trigger this error_class using sql command. This error_class are only thrown by "mergeExpressions" field of AggregateWindowFunction. But this field isn't called anywhere in all aggregate window function. Is it an internal error? |
|
@MaxGekk , any comment? |
There was a problem hiding this comment.
Can you trigger the error from user space (by SQL statement, for instance)?
There was a problem hiding this comment.
I can't find a method to trigger this error_class using SQL statement. This error_class are only thrown by "mergeExpressions" field of AggregateWindowFunction. But this field isn't called anywhere in all aggregate window function. Maybe we can change it to internal error?
There was a problem hiding this comment.
Maybe we can change it to internal error?
Yep, let's do that.
29f1638 to
faed04c
Compare
There was a problem hiding this comment.
Could you use " instead of """
and please, add the function name. How about:
| s"""Aggregate Window Functions do not support merging.""") | |
| s"The aggregate window function ${toSQLId(funcName)} does not support merging.") |
Pass the function name:
override lazy val mergeExpressions =
throw QueryExecutionErrors.mergeUnsupportedByWindowFunctionError(prettyName)Signed-off-by: Liang Yan <ckgppl_yan@sina.cn>
Signed-off-by: Liang Yan <ckgppl_yan@sina.cn>
|
+1, LGTM. Merging to master. |
…InternalError ### What changes were proposed in this pull request? Update the error class _LEGACY_ERROR_TEMP_2010 to InternalError. ### Why are the changes needed? Fix jira issue [SPARK-42845](https://issues.apache.org/jira/browse/SPARK-42845). The original name just a number, update it to InteralError. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Add a test case in QueryExecutionErrorsSuite. Closes apache#40817 from liang3zy22/spark42845. Authored-by: Liang Yan <ckgppl_yan@sina.cn> Signed-off-by: Max Gekk <max.gekk@gmail.com>
What changes were proposed in this pull request?
Update the error class _LEGACY_ERROR_TEMP_2010 to InternalError.
Why are the changes needed?
Fix jira issue SPARK-42845. The original name just a number, update it to InteralError.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Add a test case in QueryExecutionErrorsSuite.