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 2020/09/21 14:52:12 UTC

[GitHub] [arrow] nealrichardson commented on a change in pull request #8227: ARROW-9946: [R] Check `sink` argument class in `ParquetFileWriter`

nealrichardson commented on a change in pull request #8227:
URL: https://github.com/apache/arrow/pull/8227#discussion_r492109660



##########
File path: r/R/parquet.R
##########
@@ -373,6 +380,9 @@ ParquetFileWriter$create <- function(schema,
                                      sink,
                                      properties = ParquetWriterProperties$create(),
                                      arrow_properties = ParquetArrowWriterProperties$create()) {
+  if (!inherits(sink, "OutputStream")) {
+    abort("ParquetFileWriter sink must be an FileOutputStream or BufferOutputStream")
+  }

Review comment:
       We have a helper for this kind of assertion: https://github.com/apache/arrow/blob/master/r/R/util.R#L33
   
   ```suggestion
     assert_is(sink, "OutputStream")
   ```




----------------------------------------------------------------
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:
users@infra.apache.org