Commits

Neal Richardson authored cf18a62b922
ARROW-5501: [R] Reorganize read/write file/stream functions This patch rationalizes the functions that read/write IPC format data. Summary: 1. `read_<format>()` and `write_<format>()` functions are end-user facing and should follow R idioms: `format` denotes the file (or connection, or buffer) format being read/written. Readers return an R `data.frame` (default) or a `Table` if the argument `as_data_frame = FALSE`. Writers return the data object, invisibly. 2. To make these patterns consistent, the functions `read_table()` and `read_record_batch()` are deprecated, and their functionality is folded into other functions. As they appeared to have been more developer-oriented functions, it is fair to expect their users (if they exist) to handle slightly less R-friendly interfaces. 3. Since Arrow IPC has two formats, file (aka Feather) and stream, `read/write_ipc_stream()` are added as siblings to `read/write_feather()`. 4. A special `write_to_raw()` function is added to wrap `write_ipc_stream()` and return the `raw` vector containing the buffer that was written. This is to support a use case observed in `sparklyr`. 5. Because the intent is ambiguous between IPC stream vs. file format, `read/write_arrow()` are soft deprecated (documentation advises not to use them, but they do not warn). `sparklyr` uses `write_arrow()` and we don't want to raise a deprecation warning until we can switch it to use `write_to_raw() after the 0.17 release. Closes #6771 from nealrichardson/r-feather Authored-by: Neal Richardson <neal.p.richardson@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>