Github user xguo27 commented on a diff in the pull request:
https://github.com/apache/spark/pull/10515#discussion_r48591393
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/text/TextSuite.scala
---
@@ -33,8 +33,8 @@ class TextSuite extends QueryTest with SharedSQLContext {
verifyFrame(sqlContext.read.text(testFile))
}
- test("writing") {
- val df = sqlContext.read.text(testFile)
+ test("SPARK-12562 verify write.text() can handle column name beyond
`value`") {
+ val df = sqlContext.read.text(testFile).withColumnRenamed("value",
"adwrasdf")
--- End diff --
After `write.text()`, the local text file actually does not carry the
schema name like JSON does. When reading back the text file and then call
`verifyFrame`, it will always have `value` as the column name.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]