Skip to content

Commit

Permalink
Revert "refactor!: use file for $sink_*"
Browse files Browse the repository at this point in the history
This reverts commit a2f0bf1.
  • Loading branch information
eitsupi committed Mar 19, 2024
1 parent a2f0bf1 commit 5ff2bd6
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
9 changes: 5 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
- rust-polars is updated to 0.38.3 (#937).
- New argument `non_existent` in `$replace_time_zone()` to specify what should
happen when a datetime doesn't exist.
- In rolling aggregation functions (such as `$rolling_mean()`), the default
value of argument `closed` now is `NULL`. Using `closed` with a fixed
- In rolling aggregation functions (such as `$rolling_mean()`), the default
value of argument `closed` now is `NULL`. Using `closed` with a fixed
`window_size` now throws an error.

### Other breaking changes
Expand All @@ -18,7 +18,8 @@
- Unify names of input/output function arguments (935).
- All arguments except the first argument must be named arguments.
- In `pl$read_*` and `pl$scan_*` functions, the first argument is now `source`.
- In `<DataFrame>$write_*` and `<LazyFrame>$sink_*` functions, the first argument is now `file`.
- In `<DataFrame>$write_*` functions, the first argument is now `file`.
- In `<LazyFrame>$sink_*` functions, the first argument is now `path`.
- The argument `columns` in `$drop()` is removed. `$drop()` now accepts several
character scalars, such as `$drop("a", "b", "c")` (#912).
- In `pl$col()`, the `name` argument is removed, and the `...` argument no longer
Expand All @@ -33,7 +34,7 @@
- New function `is_polars_dtype()` (#927).
- New method `<LazyFrame>to_dot()` to print the query plan of a LazyFrame with
graphviz dot syntax (#928).
- Argument `ambiguous` can now take the value `"null"` to convert ambigous
- Argument `ambiguous` can now take the value `"null"` to convert ambigous
datetimes to null values (#937).

## Polars R Package 0.15.1
Expand Down
18 changes: 9 additions & 9 deletions R/lazyframe__lazy.R
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ LazyFrame_collect_in_background = function() {
#' This writes the output of a query directly to a Parquet file without collecting
#' it in the R session first. This is useful if the output of the query is still
#' larger than RAM as it would crash the R session if it was collected into R.
#' @param file A character. File path to which the file should be written.
#' @param path A character. File path to which the file should be written.
#' @param ... Ignored.
#' @param compression String. The compression method. One of:
#' * "lz4": fast compression/decompression.
Expand Down Expand Up @@ -574,7 +574,7 @@ LazyFrame_collect_in_background = function() {
#' # load parquet directly into a DataFrame / memory
#' pl$scan_parquet(tmpf2)$collect()
LazyFrame_sink_parquet = function(
file,
path,
...,
compression = "zstd",
compression_level = 3,
Expand Down Expand Up @@ -612,7 +612,7 @@ LazyFrame_sink_parquet = function(

lf |>
.pr$LazyFrame$sink_parquet(
file,
path,
compression,
compression_level,
statistics,
Expand Down Expand Up @@ -652,7 +652,7 @@ LazyFrame_sink_parquet = function(
#' # load ipc directly into a DataFrame / memory
#' # pl$scan_ipc(tmpf2)$collect()
LazyFrame_sink_ipc = function(
file,
path,
...,
compression = "zstd",
maintain_order = TRUE,
Expand Down Expand Up @@ -686,7 +686,7 @@ LazyFrame_sink_ipc = function(

lf |>
.pr$LazyFrame$sink_ipc(
file,
path,
compression,
maintain_order
) |>
Expand Down Expand Up @@ -721,7 +721,7 @@ LazyFrame_sink_ipc = function(
#' # load parquet directly into a DataFrame / memory
#' pl$scan_csv(tmpf2)$collect()
LazyFrame_sink_csv = function(
file,
path,
...,
include_bom = FALSE,
include_header = TRUE,
Expand Down Expand Up @@ -766,7 +766,7 @@ LazyFrame_sink_csv = function(

lf |>
.pr$LazyFrame$sink_csv(
file,
path,
include_bom,
include_header,
separator,
Expand Down Expand Up @@ -808,7 +808,7 @@ LazyFrame_sink_csv = function(
#' # load parquet directly into a DataFrame / memory
#' pl$scan_ndjson(tmpf)$collect()
LazyFrame_sink_ndjson = function(
file,
path,
...,
maintain_order = TRUE,
type_coercion = TRUE,
Expand Down Expand Up @@ -841,7 +841,7 @@ LazyFrame_sink_ndjson = function(

lf |>
.pr$LazyFrame$sink_json(
file,
path,
maintain_order
) |>
unwrap("in $sink_ndjson()") |>
Expand Down
4 changes: 2 additions & 2 deletions man/IO_sink_csv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/IO_sink_ipc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/IO_sink_ndjson.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/IO_sink_parquet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/IO_write_parquet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ff2bd6

Please sign in to comment.