You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/16 15:14:08 UTC

[GitHub] [arrow] nealrichardson commented on a diff in pull request #13626: ARROW-8324: [R] Add read/write_ipc_file separate from _feather

nealrichardson commented on code in PR #13626:
URL: https://github.com/apache/arrow/pull/13626#discussion_r922689819


##########
r/R/feather.R:
##########
@@ -15,13 +15,15 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#' Write data in the Feather format
+#' Write a Feather file (an Arrow IPC file)
 #'
 #' Feather provides binary columnar serialization for data frames.
 #' It is designed to make reading and writing data frames efficient,
 #' and to make sharing data across data analysis languages easy.
-#' This function writes both the original, limited specification of the format
-#' and the version 2 specification, which is the Apache Arrow IPC file format.
+#' [write_feather()] can write both the Feather Version 1,
+#' a legacy version available starting in 2016, and the Version 2,
+#' which is the Apache Arrow IPC file format.
+#' [write_ipc_file()] is a shortcut to `write_feather(version = 2)`.

Review Comment:
   I think we should note that version 2 is default, so `write_ipc_file(df, filename)` does the same as `write_feather(df, filename)`



##########
r/R/feather.R:
##########
@@ -46,9 +48,14 @@
 #' @seealso [RecordBatchWriter] for lower-level access to writing Arrow IPC data.
 #' @seealso [Schema] for information about schemas and metadata handling.
 #' @examples
-#' tf <- tempfile()
-#' on.exit(unlink(tf))
-#' write_feather(mtcars, tf)
+#' tf1 <- tempfile(fileext = ".feather")
+#' tf2 <- tempfile(fileext = ".arrow")
+#' on.exit({
+#'   unlink(tf1)
+#'   unlink(tf2)
+#' })
+#' write_feather(mtcars, tf1, version = 1)
+#' write_ipc_file(mtcars, tf2)

Review Comment:
   Would it make sense to consolidate the docs for read/write_ipc_stream with these now? I could see arguments both ways. (Side note: there's some stale documentation in the ipc_stream functions that should get cleaned up.)



-- 
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: github-unsubscribe@arrow.apache.org

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