Skip to content

Commit

Permalink
Merge branch 'main' into add_include_file_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebacher authored Sep 23, 2024
2 parents c961d26 + cb3dd57 commit f266e79
Show file tree
Hide file tree
Showing 31 changed files with 281 additions and 271 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ Collate:
Config/rextendr/version: 0.3.1
VignetteBuilder: knitr
Config/polars/LibVersion: 0.42.2
Config/polars/RustToolchainVersion: nightly-2024-07-26
Config/polars/RustToolchainVersion: nightly-2024-09-19
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## Polars R Package (development version)

- Updated rust-polars to 0.43.1 (#1230).

### Breaking changes

- In `pl$scan_ipc()` and `pl$read_ipc()`, the argument `memory_map` is removed
(#1230).
- In `$serialize()`, in the field `schema`, the field `inner` is renamed `fields`,
and the fields `output_schema` and `filter` are removed (#1230).

### New features

- New method `$cast()` for `DataFrame` and `LazyFrame` (#1219).
Expand Down
4 changes: 2 additions & 2 deletions R/as_polars.R
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,14 @@ as_polars_series.POSIXlt = function(x, name = NULL, ...) {
#' @rdname as_polars_series
#' @export
as_polars_series.data.frame = function(x, name = NULL, ...) {
as_polars_df(x)$to_struct(name = name)
as_polars_df(x)$to_struct(name = name %||% "")
}


#' @rdname as_polars_series
#' @export
as_polars_series.vctrs_rcrd = function(x, name = NULL, ...) {
pl$select(unclass(x))$to_struct(name = name)
pl$select(unclass(x))$to_struct(name = name %||% "")
}


Expand Down
2 changes: 1 addition & 1 deletion R/dataframe__frame.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ DataFrame_width = method_as_active_binding(\() .pr$DataFrame$shape(self)[2L])
#'
#' @examples
#' pl$DataFrame(
#' a = list(c(1, 2, 3, 4, 5)), # NB if first column should be a list, wrap it in a Series
#' a = c(1, 2, 3, 4, 5),
#' b = 1:5,
#' c = letters[1:5],
#' d = list(1:1, 1:2, 1:3, 1:4, 1:5)
Expand Down
2 changes: 1 addition & 1 deletion R/expr__expr.R
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ Expr_is_not_nan = use_extendr_wrapper
#' )
#'
#' # recycling
#' pl$DataFrame(mtcars)$with_columns(pl$col("mpg")$slice(0, 1))
#' pl$DataFrame(mtcars)$with_columns(pl$col("mpg")$slice(0, 1)$first())
Expr_slice = function(offset, length = NULL) {
.pr$Expr$slice(self, offset, wrap_e(length)) |>
unwrap("in $slice():")
Expand Down
2 changes: 1 addition & 1 deletion R/extendr-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ concat_series <- function(l, rechunk, to_supertypes) .Call(wrap__concat_series,

new_from_csv <- function(path, has_header, separator, comment_prefix, quote_char, skip_rows, dtypes, null_values, ignore_errors, cache, infer_schema_length, n_rows, encoding, low_memory, rechunk, skip_rows_after_header, row_index_name, row_index_offset, try_parse_dates, eol_char, raise_if_empty, truncate_ragged_lines, include_file_paths) .Call(wrap__new_from_csv, path, has_header, separator, comment_prefix, quote_char, skip_rows, dtypes, null_values, ignore_errors, cache, infer_schema_length, n_rows, encoding, low_memory, rechunk, skip_rows_after_header, row_index_name, row_index_offset, try_parse_dates, eol_char, raise_if_empty, truncate_ragged_lines, include_file_paths)

import_arrow_ipc <- function(path, n_rows, cache, rechunk, row_name, row_index, memory_map, hive_partitioning, hive_schema, try_parse_hive_dates, include_file_paths) .Call(wrap__import_arrow_ipc, path, n_rows, cache, rechunk, row_name, row_index, memory_map, hive_partitioning, hive_schema, try_parse_hive_dates, include_file_paths)
import_arrow_ipc <- function(path, n_rows, cache, rechunk, row_name, row_index, hive_partitioning, hive_schema, try_parse_hive_dates, include_file_paths) .Call(wrap__import_arrow_ipc, path, n_rows, cache, rechunk, row_name, row_index, hive_partitioning, hive_schema, try_parse_hive_dates, include_file_paths)

new_from_ndjson <- function(path, infer_schema_length, batch_size, n_rows, low_memory, rechunk, row_index_name, row_index_offset, ignore_errors) .Call(wrap__new_from_ndjson, path, infer_schema_length, batch_size, n_rows, low_memory, rechunk, row_index_name, row_index_offset, ignore_errors)

Expand Down
1 change: 0 additions & 1 deletion R/io_ipc.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pl_scan_ipc = function(
rechunk = rechunk,
row_name = row_index_name,
row_index = row_index_offset,
memory_map = memory_map,
hive_partitioning = hive_partitioning,
hive_schema = hive_schema,
try_parse_hive_dates = try_parse_hive_dates,
Expand Down
2 changes: 1 addition & 1 deletion R/lazyframe__lazy.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ LazyFrame_width = method_as_active_binding(\() length(self$schema))
#'
#' @examples
#' pl$LazyFrame(
#' a = list(c(1, 2, 3, 4, 5)),
#' a = c(1, 2, 3, 4, 5),
#' b = 1:5,
#' c = letters[1:5],
#' d = list(1:1, 1:2, 1:3, 1:4, 1:5)
Expand Down
2 changes: 1 addition & 1 deletion man/Expr_slice.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/pl_DataFrame.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/pl_LazyFrame.Rd

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

Loading

0 comments on commit f266e79

Please sign in to comment.