aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/R/SQLContext.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/pkg/R/SQLContext.R')
-rw-r--r--R/pkg/R/SQLContext.R11
1 files changed, 7 insertions, 4 deletions
diff --git a/R/pkg/R/SQLContext.R b/R/pkg/R/SQLContext.R
index a1edef7608..c2a1e240ad 100644
--- a/R/pkg/R/SQLContext.R
+++ b/R/pkg/R/SQLContext.R
@@ -544,12 +544,15 @@ sql <- function(x, ...) {
dispatchFunc("sql(sqlQuery)", x, ...)
}
-#' Create a SparkDataFrame from a SparkSQL Table
+#' Create a SparkDataFrame from a SparkSQL table or view
#'
-#' Returns the specified Table as a SparkDataFrame. The Table must have already been registered
-#' in the SparkSession.
+#' Returns the specified table or view as a SparkDataFrame. The table or view must already exist or
+#' have already been registered in the SparkSession.
#'
-#' @param tableName The SparkSQL Table to convert to a SparkDataFrame.
+#' @param tableName the qualified or unqualified name that designates a table or view. If a database
+#' is specified, it identifies the table/view from the database.
+#' Otherwise, it first attempts to find a temporary view with the given name
+#' and then match the table/view from the current database.
#' @return SparkDataFrame
#' @rdname tableToDF
#' @name tableToDF