You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "sandip-db (via GitHub)" <gi...@apache.org> on 2025/04/18 23:06:22 UTC
Re: [PR] [SPARK-51848] Fix parsing XML records with defined schema of array/structs of Variant [spark]
sandip-db commented on code in PR #50646:
URL: https://github.com/apache/spark/pull/50646#discussion_r2051231979
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/xml/XmlVariantSuite.scala:
##########
@@ -418,14 +418,20 @@ class XmlVariantSuite extends QueryTest with SharedSparkSession with TestXmlData
val df = createDSLDataFrame(
fileName = "books-complicated.xml",
schemaDDL = Some(
- "_id string, author string, title string, genre variant, price double, " +
- "publish_dates variant"
+ "_id string, author string, title string, " +
+ "genre struct<genreid int, name variant>, " + // Struct with variant
+ "price variant, " + // Scalar as variant
+ "publish_dates struct<publish_date array<variant>>" // Array with variant
Review Comment:
What about MapType with Variant?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org