You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2023/01/30 13:51:03 UTC
[spark] branch master updated: [SPARK-42233][SQL] Improve error message for `PIVOT_AFTER_GROUP_BY`
This is an automated email from the ASF dual-hosted git repository.
maxgekk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new c1bee105866 [SPARK-42233][SQL] Improve error message for `PIVOT_AFTER_GROUP_BY`
c1bee105866 is described below
commit c1bee1058667b631ed4e027ebb9791698023e9c9
Author: itholic <ha...@databricks.com>
AuthorDate: Mon Jan 30 16:50:42 2023 +0300
[SPARK-42233][SQL] Improve error message for `PIVOT_AFTER_GROUP_BY`
### What changes were proposed in this pull request?
This PR proposes to improve error message for `PIVOT_AFTER_GROUP_BY` to give users better error message.
### Why are the changes needed?
The current error message only shows the cause, not a solution. We should provide proper solution as well in the error message.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
The existing CI should pass.
Closes #39793 from itholic/PIVOT_AFTER_GROUP_BY.
Authored-by: itholic <ha...@databricks.com>
Signed-off-by: Max Gekk <ma...@gmail.com>
---
core/src/main/resources/error/error-classes.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/resources/error/error-classes.json b/core/src/main/resources/error/error-classes.json
index 67e324db1dc..e6dcdf1bed8 100644
--- a/core/src/main/resources/error/error-classes.json
+++ b/core/src/main/resources/error/error-classes.json
@@ -1557,7 +1557,7 @@
},
"PIVOT_AFTER_GROUP_BY" : {
"message" : [
- "PIVOT clause following a GROUP BY clause."
+ "PIVOT clause following a GROUP BY clause. Consider pushing the GROUP BY into a subquery."
]
},
"PIVOT_TYPE" : {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org