maropu commented on a change in pull request #28490:
URL: https://github.com/apache/spark/pull/28490#discussion_r434371366



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -3495,6 +3495,59 @@ class SQLQuerySuite extends QueryTest with 
SharedSparkSession with AdaptiveSpark
     assert(df4.schema.head.name === "randn(1)")
     checkIfSeedExistsInExplain(df2)
   }
+
+  test("SPARK-31670: Struct Field in groupByExpr with CUBE") {
+    withTable("t1") {
+      sql(
+        """create table t1(
+          |a string,
+          |b int,
+          |c array<struct<row_id:int,json_string:string>>,
+          |d array<array<string>>,
+          |e array<map<string, int>>)
+          |using orc""".stripMargin)

Review comment:
       Please use a temp view for test performance? Also, its better to add 
some rows for answer checks in this test table instead of the current null 
table.

##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -3495,6 +3495,59 @@ class SQLQuerySuite extends QueryTest with 
SharedSparkSession with AdaptiveSpark
     assert(df4.schema.head.name === "randn(1)")
     checkIfSeedExistsInExplain(df2)
   }
+
+  test("SPARK-31670: Struct Field in groupByExpr with CUBE") {
+    withTable("t1") {
+      sql(
+        """create table t1(
+          |a string,
+          |b int,
+          |c array<struct<row_id:int,json_string:string>>,
+          |d array<array<string>>,
+          |e array<map<string, int>>)
+          |using orc""".stripMargin)

Review comment:
       Please use a temp view for test performance. Also, its better to add 
some rows for answer checks in this test table instead of the current null 
table.




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