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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to