You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/17 09:14:38 UTC

[GitHub] [spark] zero323 commented on a diff in pull request #37549: [SPARK-40103][R][FEATURE] Support read/write.csv() in SparkR

zero323 commented on code in PR #37549:
URL: https://github.com/apache/spark/pull/37549#discussion_r947657570


##########
R/pkg/R/SQLContext.R:
##########
@@ -492,6 +492,37 @@ read.text <- function(path, ...) {
   dataFrame(sdf)
 }
 
+#' Create a SparkDataFrame from a csv file.
+#'
+#' Loads a Parquet file, returning the result as a SparkDataFrame.
+#'
+#' @param path Path of file to read. A vector of multiple paths is allowed.
+#' @param ... additional external data source specific named properties.
+#'            You can find the csv-specific options for reading csv files in
+# nolint start
+#'            \url{https://spark.apache.org/docs/latest/sql-data-sources-csv.html#data-source-option}{Data Source Option} in the version you use.
+# nolint end
+#' @return SparkDataFrame
+#' @rdname read.spark.csv
+#' @examples
+#'\dontrun{
+#' sparkR.session()
+#' path <- "path/to/file.csv"
+#' df <- read.spark.csv(path)
+#' }
+#' @name read.spark.csv
+#' @note read.spark.csv since 3.3.0
+read.spark.csv <- function(path, ...) {

Review Comment:
   I have the same feelings as @HyukjinKwon here.
   
   If it wasn't for the name conflict it would be a nice addition. However, adding another naming convention (`spark.read.csv` would be a better choice, but then, it wouldn't be an "obvious" reading utility) just for the sake of omitting `csv` in a call, doesn't seem to be worth it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org