Skip to content

Commit

Permalink
[SQL] Update SQLContext.read.text doc
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yanboliang authored and rxin committed Dec 17, 2015
1 parent a170d34 commit 6e07716
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/pyspark/sql/readwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def parquet(self, *paths):
@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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 6e07716

Please sign in to comment.