yaooqinn commented on code in PR #46609:
URL: https://github.com/apache/spark/pull/46609#discussion_r1607505328


##########
sql/core/src/test/scala/org/apache/spark/sql/XmlFunctionsSuite.scala:
##########
@@ -40,6 +40,17 @@ class XmlFunctionsSuite extends QueryTest with 
SharedSparkSession {
       Row(Row(1)) :: Nil)
   }
 
+  test("SPARK-48300: from_xml - Codegen Support") {
+    withTempView("XmlToStructsTable") {
+      val dataDF = Seq("""<ROW><a>1</a></ROW>""").toDF("value")
+      dataDF.createOrReplaceTempView("XmlToStructsTable")
+      val df = sql("SELECT from_xml(value, 'a INT') FROM XmlToStructsTable")
+      val plan = df.queryExecution.executedPlan
+      assert(plan.isInstanceOf[WholeStageCodegenExec])

Review Comment:
   ```suggestion
         
assert(df.queryExecution.executedPlan.isInstanceOf[WholeStageCodegenExec])
   ```



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