Skip to content
Snippets Groups Projects
Commit 2aea892e authored by Yin Huai's avatar Yin Huai Committed by Michael Armbrust
Browse files

[SQL] Fix docs of SQLContext.tables

Author: Yin Huai <yhuai@databricks.com>

Closes #4579 from yhuai/tablesDoc and squashes the following commits:

7f8964c [Yin Huai] Fix doc.
parent 1d0596a1
No related branches found
No related tags found
No related merge requests found
......@@ -775,8 +775,8 @@ class SQLContext(@transient val sparkContext: SparkContext)
DataFrame(this, catalog.lookupRelation(Seq(tableName)))
/**
* Returns a [[DataFrame]] containing names of existing tables in the given database.
* The returned DataFrame has two columns, tableName and isTemporary (a column with BooleanType
* Returns a [[DataFrame]] containing names of existing tables in the current database.
* The returned DataFrame has two columns, tableName and isTemporary (a Boolean
* indicating if a table is a temporary one or not).
*/
def tables(): DataFrame = {
......@@ -784,8 +784,8 @@ class SQLContext(@transient val sparkContext: SparkContext)
}
/**
* Returns a [[DataFrame]] containing names of existing tables in the current database.
* The returned DataFrame has two columns, tableName and isTemporary (a column with BooleanType
* Returns a [[DataFrame]] containing names of existing tables in the given database.
* The returned DataFrame has two columns, tableName and isTemporary (a Boolean
* indicating if a table is a temporary one or not).
*/
def tables(databaseName: String): DataFrame = {
......@@ -793,7 +793,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
}
/**
* Returns an array of names of tables in the current database.
* Returns the names of tables in the current database as an array.
*/
def tableNames(): Array[String] = {
catalog.getTables(None).map {
......@@ -802,7 +802,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
}
/**
* Returns an array of names of tables in the given database.
* Returns the names of tables in the given database as an array.
*/
def tableNames(databaseName: String): Array[String] = {
catalog.getTables(Some(databaseName)).map {
......
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