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 <haejoon....@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 <haejoon....@databricks.com> Signed-off-by: Max Gekk <max.g...@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-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org