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/08/30 14:21:51 UTC

[GitHub] [spark] srielau commented on a diff in pull request #37712: [SPARK-40260][SQL] Use error classes in the compilation errors of GROUP BY a position

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


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -136,6 +136,18 @@
       "Grouping sets size cannot be greater than <maxSize>"
     ]
   },
+  "GROUP_BY_POS_OUT_OF_RANGE" : {
+    "message" : [
+      "GROUP BY position <index> is not in select list (valid range is [1, <size>])."
+    ],
+    "sqlState" : "42000"
+  },
+  "GROUP_BY_POS_REFERS_AGG_EXPR" : {
+    "message" : [
+      "GROUP BY <index> refers to an expression that is or contains an aggregate function. Aggregate functions are not allowed in GROUP BY, but got <aggExpr>."

Review Comment:
   How about this? Same content, just less wordy.
   
   ```suggestion
         "GROUP BY <index> refers to an expression <aggExpr> that contains an aggregate function. Aggregate functions are not allowed in GROUP BY."
   ```



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