dongjoon-hyun commented on a change in pull request #35749:
URL: https://github.com/apache/spark/pull/35749#discussion_r820469853



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
##########
@@ -3087,6 +3087,26 @@ class DataFrameSuite extends QueryTest
 
     assert(res.collect.length == 2)
   }
+
+  test("SPARK-38285: Fix ClassCastException: GenericArrayData cannot be cast 
to InternalRow") {
+    withTempView("v1") {
+      val sqlText =
+        """
+          |create or replace temp view v1 as
+          |select * from values
+          |(array(
+          |  named_struct('s', 'string1', 'b', array(named_struct('e', 
'string2'))),
+          |  named_struct('s', 'string4', 'b', array(named_struct('e', 
'string5')))
+          |  )
+          |)
+          |v1(o);
+          |""".stripMargin
+      sql(sqlText)
+
+      val df = sql("select eo.b.e from (select explode(o) as eo from v1)")

Review comment:
       ditto.




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

To unsubscribe, e-mail: [email protected]

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