Skip to content

Commit a8f560c

Browse files
yhuailiancheng
authored andcommitted
[SQL] Fix docs of SQLContext.tables
Author: Yin Huai <[email protected]> Closes #4579 from yhuai/tablesDoc and squashes the following commits: 7f8964c [Yin Huai] Fix doc. (cherry picked from commit 2aea892) Signed-off-by: Cheng Lian <[email protected]>
1 parent b9f332a commit a8f560c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -775,25 +775,25 @@ class SQLContext(@transient val sparkContext: SparkContext)
775775
DataFrame(this, catalog.lookupRelation(Seq(tableName)))
776776

777777
/**
778-
* Returns a [[DataFrame]] containing names of existing tables in the given database.
779-
* The returned DataFrame has two columns, tableName and isTemporary (a column with BooleanType
778+
* Returns a [[DataFrame]] containing names of existing tables in the current database.
779+
* The returned DataFrame has two columns, tableName and isTemporary (a Boolean
780780
* indicating if a table is a temporary one or not).
781781
*/
782782
def tables(): DataFrame = {
783783
createDataFrame(catalog.getTables(None)).toDataFrame("tableName", "isTemporary")
784784
}
785785

786786
/**
787-
* Returns a [[DataFrame]] containing names of existing tables in the current database.
788-
* The returned DataFrame has two columns, tableName and isTemporary (a column with BooleanType
787+
* Returns a [[DataFrame]] containing names of existing tables in the given database.
788+
* The returned DataFrame has two columns, tableName and isTemporary (a Boolean
789789
* indicating if a table is a temporary one or not).
790790
*/
791791
def tables(databaseName: String): DataFrame = {
792792
createDataFrame(catalog.getTables(Some(databaseName))).toDataFrame("tableName", "isTemporary")
793793
}
794794

795795
/**
796-
* Returns an array of names of tables in the current database.
796+
* Returns the names of tables in the current database as an array.
797797
*/
798798
def tableNames(): Array[String] = {
799799
catalog.getTables(None).map {
@@ -802,7 +802,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
802802
}
803803

804804
/**
805-
* Returns an array of names of tables in the given database.
805+
* Returns the names of tables in the given database as an array.
806806
*/
807807
def tableNames(databaseName: String): Array[String] = {
808808
catalog.getTables(Some(databaseName)).map {

0 commit comments

Comments
 (0)