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 2020/12/18 14:07:05 UTC

[GitHub] [spark] sqlwindspeaker commented on a change in pull request #30781: [SPARK-22748][SQL] Analyze grouping__id bug when grouping__id is used as a column reference of subquery

sqlwindspeaker commented on a change in pull request #30781:
URL: https://github.com/apache/spark/pull/30781#discussion_r545851905



##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
##########
@@ -1006,4 +1006,58 @@ class AnalysisSuite extends AnalysisTest with Matchers {
       checkAnalysis(plan, expect)
     }
   }
+
+  test("SPARK-22748: grouping_id() can only be used with GroupingSets/Cube/Rollup") {
+
+    val rollUpPlan = parsePlan("""select grouping__id from (
+                                 |select grouping__id from (
+                                 |select a, b, count(1), grouping__id from TaBlE2
+                                 | group by a, b with rollup))
+                                 |""".stripMargin)

Review comment:
       ok




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