Copilot commented on code in PR #49276:
URL: https://github.com/apache/arrow/pull/49276#discussion_r3573610362


##########
r/R/feather.R:
##########
@@ -15,56 +15,25 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#' Write a Feather file (an Arrow IPC file)
+#' Write a Feather file (deprecated)
 #'
-#' 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.
-#' [write_feather()] can write both the Feather Version 1 (V1),
-#' a legacy version available starting in 2016, and the Version 2 (V2),
-#' which is the Apache Arrow IPC file format.
-#' The default version is V2.
-#' V1 files are distinct from Arrow IPC files and lack many features,
-#' such as the ability to store all Arrow data tyeps, and compression support.
-#' [write_ipc_file()] can only write V2 files.
+#' @description
+#' `write_feather()` is deprecated and will be removed in a future release.
+#' Use [write_ipc_file()] instead.
 #'
-#' @param x `data.frame`, [RecordBatch], or [Table]
-#' @param sink A string file path, connection, URI, or [OutputStream], or path 
in a file
-#' system (`SubTreeFileSystem`)
+#' Column-oriented file format designed for fast reading and writing
+#' of data frames. Feather V2 is the Arrow IPC file format.
+#' Feather V1 is a legacy format available starting in 2016 that lacks many
+#' features, such as the ability to store all Arrow data types, and compression
+#' support. Feather V1 is deprecated; use [write_ipc_file()] for new files.
+#'
+#' @inheritParams write_ipc_file
 #' @param version integer Feather file version, Version 1 or Version 2. 
Version 2 is the default.
-#' @param chunk_size For V2 files, the number of rows that each chunk of data
-#' should have in the file. Use a smaller `chunk_size` when you need faster
-#' random row access. Default is 64K. This option is not supported for V1.
-#' @param compression Name of compression codec to use, if any. Default is
-#' "lz4" if LZ4 is available in your build of the Arrow C++ library, otherwise
-#' "uncompressed". "zstd" is the other available codec and generally has better
-#' compression ratios in exchange for slower read and write performance.
-#' "lz4" is shorthand for the "lz4_frame" codec.
-#' See [codec_is_available()] for details.
-#' `TRUE` and `FALSE` can also be used in place of "default" and 
"uncompressed".
-#' This option is not supported for V1.
-#' @param compression_level If `compression` is "zstd", you may
-#' specify an integer compression level. If omitted, the compression codec's
-#' default compression level is used.
 #'

Review Comment:
   `write_feather()` still supports `version = 1`, but the docs inherited from 
`write_ipc_file()` imply `chunk_size`, `compression`, and `compression_level` 
apply generally. In reality, V1 only supports the defaults (e.g., no 
compression and default chunk size) and will error otherwise via 
`check_feather_v1_options()`. Please document these V1 restrictions so behavior 
and docs stay consistent until the function is removed.



##########
r/tests/testthat/helper-filesystems.R:
##########
@@ -32,16 +32,16 @@ test_filesystem <- function(name, fs, path_formatter, 
uri_formatter) {
   # like we can do in S3/GCS. Skipping any tests that rely on this feature
   # for name == "azure".
   if (name != "azure") {
-    test_that(sprintf("read/write Feather on %s using URIs", name), {
-      write_feather(example_data, uri_formatter("test.feather"))
-      expect_identical(read_feather(uri_formatter("test.feather")), 
example_data)
+    test_that(sprintf("read/write IPC on %s using URIs", name), {
+      write_ipc_file(example_data, uri_formatter("test.arrow"))
+      expect_identical(read_feather(uri_formatter("test.arrow")), example_data)

Review Comment:
   This test reads the IPC file using `read_feather()`, which is now deprecated 
and will emit a warning. Since the test isn't asserting on that warning, it 
will fail under `testthat`'s warning handling and also defeats the goal of 
updating tests away from Feather APIs.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to