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 2021/04/08 09:51:29 UTC

[GitHub] [spark] AngersZhuuuu commented on a change in pull request #32089: [SPARK-34986][SQL] Aggregate ordinal should judge is it contains aggregate function

AngersZhuuuu commented on a change in pull request #32089:
URL: https://github.com/apache/spark/pull/32089#discussion_r609521768



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -268,6 +268,15 @@ private[spark] object QueryCompilationErrors {
       s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
   }
 
+  def groupByPositionIsAggregateExpressionError(

Review comment:
       Done

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -268,6 +268,15 @@ private[spark] object QueryCompilationErrors {
       s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
   }
 
+  def groupByPositionIsAggregateExpressionError(
+      index: Int,
+      expr: Expression,
+      t: TreeNode[_]): Throwable = {
+    new AnalysisException(s"GROUP BY expression in position $index is an aggregate expression, " +

Review comment:
       Done

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -268,6 +268,15 @@ private[spark] object QueryCompilationErrors {
       s"(valid range is [1, $size])", t.origin.line, t.origin.startPosition)
   }
 
+  def groupByPositionIsAggregateExpressionError(
+      index: Int,
+      expr: Expression,
+      t: TreeNode[_]): Throwable = {
+    new AnalysisException(s"GROUP BY expression in position $index is an aggregate expression, " +
+      s"aggregate expression are not allowed in GROUP BY, but got `$expr`",

Review comment:
       Done




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

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