sandip-db commented on code in PR #43455:
URL: https://github.com/apache/spark/pull/43455#discussion_r1366303706
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/xml/XmlSuite.scala:
##########
@@ -1209,10 +1209,9 @@ class XmlSuite extends QueryTest with SharedSparkSession
{
"<ROW><year>2015</year><make>Chevy</make><model>Volt</model><comment>No</comment></ROW>")
val xmlRDD = spark.sparkContext.parallelize(data)
val ds = spark.createDataset(xmlRDD)(Encoders.STRING)
- assert(spark.read.option("rowTag", "ROW").xml(ds).collect().length === 3)
Review Comment:
It is
[assumed](https://github.com/apache/spark/blob/8fd915ffaba1cc99813cc8d6d2a28688d7fae39b/sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala#L576)
that each XML string in the `Dataset` contains only one `Row`. So the parser
doesn't look for `rowTag` as it iterates over all the strings in the Dataset.
--
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]