nealrichardson commented on a change in pull request #8197:
URL: https://github.com/apache/arrow/pull/8197#discussion_r494396737
##########
File path: r/R/ipc_stream.R
##########
@@ -90,16 +90,18 @@ write_to_raw <- function(x, format = c("stream", "file")) {
#' open.
#' @param as_data_frame Should the function return a `data.frame` (default) or
#' an Arrow [Table]?
+#' @param filesystem A [FileSystem] where `file` can be found if it is a
+#' string file path; default is the local file system
#' @param ... extra parameters passed to `read_feather()`.
#'
#' @return A `data.frame` if `as_data_frame` is `TRUE` (the default), or an
#' Arrow [Table] otherwise
#' @seealso [read_feather()] for writing IPC files. [RecordBatchReader] for a
#' lower-level interface.
#' @export
-read_ipc_stream <- function(file, as_data_frame = TRUE, ...) {
+read_ipc_stream <- function(file, as_data_frame = TRUE, filesystem = NULL,
...) {
if (!inherits(file, "InputStream")) {
Review comment:
Unfortunately, it's spelled `filesystem$OpenInputStream(file)` if it's
for reading, or `filesystem$OpenOutputStream(file)` for writing. I resisted
adding the extra argument, but I thought it was less bad than requiring users
to learn those.
But we could think of other solutions. One possibility is having some sort
of `FileLocator` object that is filesystem + path; we've started exploring that
in places in the C++ library, and I've been looking into similar things for
ARROW-9870. Maybe we could revisit this question in that PR (next week-ish)?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]