Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump rust-polars to 0.32.0 #334

Merged
merged 26 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ddf7df6
obey compiler halfway
sorhawell Jul 24, 2023
5b5db0b
fix more compiler errors & impl robj_to!(f64,)
sorhawell Jul 25, 2023
6a7178a
refactor Expr_sample
sorhawell Jul 25, 2023
2824957
fix remaining compiler errors
sorhawell Jul 27, 2023
24b25ed
document
sorhawell Jul 27, 2023
fd12433
merge main fix conflict bump to 0.32
sorhawell Aug 21, 2023
61fd186
obey compiler, only half-done on R sise, refactor when-then, fmt->fo…
sorhawell Aug 24, 2023
6c85afd
with last
sorhawell Aug 24, 2023
c4771ee
fix all unit tests and examples
sorhawell Aug 25, 2023
a88b2fe
with last
sorhawell Aug 25, 2023
892c787
move changes notes
sorhawell Aug 25, 2023
8d5891a
try fix docs
sorhawell Aug 28, 2023
1b9b42f
bump flume, ipc-channel, state, make release-optmized use lto="fat", …
sorhawell Aug 28, 2023
9aa4001
update docs msrv + date_range eager = true
sorhawell Aug 28, 2023
d50c292
update msrv to 1.70
sorhawell Aug 28, 2023
e5a1e63
update news 1
sorhawell Aug 28, 2023
a5b91f1
news + minor Makevars.win
sorhawell Aug 28, 2023
c4fd201
erxtendr 0.3.1 not 9000
sorhawell Aug 28, 2023
61bdeee
add more news
sorhawell Aug 28, 2023
a3e906e
make fmt
sorhawell Aug 28, 2023
995c6a3
Merge branch 'main' into bump_rust_31
etiennebacher Aug 28, 2023
6fdd7c0
tweak news
etiennebacher Aug 28, 2023
e687b4c
tweak readme and regen docs
eitsupi Aug 29, 2023
ea00a15
formatting
eitsupi Aug 29, 2023
be54ceb
ref to the main branch
eitsupi Aug 29, 2023
796c12d
some test requiers the package installed
eitsupi Aug 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SHELL := /bin/bash
VENV := .venv

RUST_TOOLCHAIN_VERSION := nightly-2023-05-07
RUST_TOOLCHAIN_VERSION := nightly-2023-06-23

MANIFEST_PATH := src/rust/Cargo.toml

Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# polars (development version)

# polars 0.7.0.9000

## BREAKING CHANGES
- Series_is_sorted: Nulls_last argument is dropped (#PRXYZ).

# polars 0.7.0

## BREAKING CHANGES
Expand Down
25 changes: 17 additions & 8 deletions R/expr__expr.R
Original file line number Diff line number Diff line change
Expand Up @@ -3675,16 +3675,18 @@ Expr_reshape = function(dims) {
#' @param seed numeric value of 0 to 2^52
#' Seed for the random number generator. If set to Null (default), a random
#' seed value integerish value between 0 and 10000 is picked
#' @param fixed_seed Boolean, If TRUE, The seed will not be incremented between draws.
#' This can make output predictable because draw ordering can change due to threads being
#' scheduled in a different order.
#' @return Expr
#' @aliases shuffle
#' @format NULL
#' @keywords Expr
#' @examples
#' pl$DataFrame(a = 1:3)$select(pl$col("a")$shuffle(seed = 1))
Expr_shuffle = function(seed = NULL) {
seed = seed %||% sample(0:10000, 1L)
if (!is.numeric(seed) || any(is.na(seed)) || length(seed) != 1L) pstop(err = "seed must be non NA/NaN numeric scalar")
unwrap(.pr$Expr$shuffle(self, seed))
#' stop("new param + reworked to robj_to - > update tests of shufle")
etiennebacher marked this conversation as resolved.
Show resolved Hide resolved
Expr_shuffle = function(seed = NULL, fixed_seed = FALSE) {
.pr$Expr$shuffle(self, seed, fixed_seed) |> unwrap("in $shuffle()")
}


Expand Down Expand Up @@ -3715,11 +3717,18 @@ Expr_shuffle = function(seed = NULL) {
#' df$select(pl$col("a")$sample(n = 2, with_replacement = FALSE, seed = 1L))
Expr_sample = function(frac = NULL, with_replacement = TRUE, shuffle = FALSE, seed = NULL, n = NULL) {
# check seed
seed = seed %||% sample(0:10000, 1L)
if (!is.numeric(seed) || any(is.na(seed)) || length(seed) != 1L) pstop(err = "seed must be non NA/NaN numeric scalar")

# check not both n and frac
if (!is.null(n) && !is.null(frac)) pstop(err = "cannot specify both `n` and `frac`")

stop("make as pcase")
if (!is.null(n) && !is.null(frac)) {
Err(.pr$RPolarsErr$new()$plain("cannot specify both `n` and `frac`"))
} else {
Ok()
} |>
and_then(\(not_used) {


})

# use n
if (!is.null(n)) {
Expand Down
2 changes: 1 addition & 1 deletion R/functions__eager.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pl$date_range = function(
) {
low = convert_time_unit_for_lazy(low, time_unit, time_zone)
high = convert_time_unit_for_lazy(high, time_unit, time_zone)
result = r_date_range_lazy(low, high, interval, closed, time_zone)
result = r_date_range_lazy(low, high, interval, closed, time_unit, time_zone)
return(unwrap(result, "in pl$date_range():"))
}

Expand Down
5 changes: 2 additions & 3 deletions R/series__series.R
Original file line number Diff line number Diff line change
Expand Up @@ -782,14 +782,13 @@ Series_flags = method_as_property(function() {
#' is_sorted
#' @keywords Series
#' @param descending Check if the Series is sorted in descending order.
#' @param nulls_last bool where to keep nulls, default same as reverse
#' @return DataType
#' @aliases is_sorted
#' @details property sorted flags are not settable, use set_sorted
#' @examples
#' pl$Series(1:4)$sort()$is_sorted()
Series_is_sorted = function(descending = FALSE, nulls_last = NULL) {
.pr$Series$is_sorted(self, descending, nulls_last)
Series_is_sorted = function(descending = FALSE) {
.pr$Series$is_sorted(self, descending) |> unwrap("in $is_sorted()")
}


Expand Down
Loading
Loading