Skip to content
Snippets Groups Projects
Commit 6e077166 authored by Yanbo Liang's avatar Yanbo Liang Committed by Reynold Xin
Browse files

[SQL] Update SQLContext.read.text doc

Since we rename the column name from ```text``` to ```value``` for DataFrame load by ```SQLContext.read.text```, we need to update doc.

Author: Yanbo Liang <ybliang8@gmail.com>

Closes #10349 from yanboliang/text-value.
parent a170d34a
No related branches found
No related tags found
No related merge requests found
......@@ -207,7 +207,7 @@ class DataFrameReader(object):
@ignore_unicode_prefix
@since(1.6)
def text(self, paths):
"""Loads a text file and returns a [[DataFrame]] with a single string column named "text".
"""Loads a text file and returns a [[DataFrame]] with a single string column named "value".
Each line in the text file is a new row in the resulting DataFrame.
......
......@@ -339,7 +339,7 @@ class DataFrameReader private[sql](sqlContext: SQLContext) extends Logging {
}
/**
* Loads a text file and returns a [[DataFrame]] with a single string column named "text".
* Loads a text file and returns a [[DataFrame]] with a single string column named "value".
* Each line in the text file is a new row in the resulting DataFrame. For example:
* {{{
* // Scala:
......
......@@ -76,7 +76,7 @@ private[sql] class TextRelation(
(@transient val sqlContext: SQLContext)
extends HadoopFsRelation(maybePartitionSpec, parameters) {
/** Data schema is always a single column, named "text". */
/** Data schema is always a single column, named "value". */
override def dataSchema: StructType = new StructType().add("value", StringType)
/** This is an internal data source that outputs internal row format. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment