You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/14 19:18:35 UTC

[GitHub] [spark] srielau commented on a diff in pull request #39061: [WIP][SPARK-41518][SQL] Assign a name to the error class `_LEGACY_ERROR_TEMP_2422`

srielau commented on code in PR #39061:
URL: https://github.com/apache/spark/pull/39061#discussion_r1048617462


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -496,6 +496,11 @@
     ],
     "sqlState" : "42000"
   },
+  "GROUPING_EXPRESSIONS_NOT_FOUND" : {
+    "message" : [
+      "Not found any GROUP BY expressions, and <sqlExpr> is not an aggregate function. Wrap <aggExprs> by windowing function(s) or wrap <sqlExpr> by `first()` (or `first_value()`) if you don't care which value you get."
+    ]
+  },

Review Comment:
   What is more likely? The user forgot the GROUP BY clause, the user forgot to aggregate the expression, or they meant to use window functions? My money is on forgetting the GROUP BY clause....
   How about:
   GROUPING_EXPRESSION_WITHOUT_GROUP_BY
   The query including grouping expression \<groupingExpr\> and aggregate expressions \<aggExprs\> does not include a GROUP BY clause. Add "GROUP BY \<groupingExpr\>", aggregate \<groupingExpr\>, or turn the \<aggExprs\> into window functions using OVER clauses.  



-- 
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