maropu commented on a change in pull request #30781:
URL: https://github.com/apache/spark/pull/30781#discussion_r551074252
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
##########
@@ -1006,4 +1006,72 @@ class AnalysisSuite extends AnalysisTest with Matchers {
checkAnalysis(plan, expect)
}
}
+
+ test("SPARK-22748: Analyze bug when grouping__id is used as a colref of
subquery") {
+ assertAnalysisSuccess(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), false)
+
+
Review comment:
nit: remove this unnecessary blank.
----------------------------------------------------------------
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]