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

fix: bump rust polars to 0.39.1 #1042

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ Collate:
'zzz.R'
Config/rextendr/version: 0.3.1
VignetteBuilder: knitr
Config/polars/LibVersion: 0.39.0
Config/polars/RustToolchainVersion: nightly-2024-03-28
Config/polars/LibVersion: 0.39.1
Config/polars/RustToolchainVersion: nightly-2024-04-15
66 changes: 33 additions & 33 deletions src/rust/Cargo.lock

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

9 changes: 5 additions & 4 deletions src/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "r-polars"
version = "0.39.0"
version = "0.39.1"
edition = "2021"
rust-version = "1.76.0"
publish = false
Expand Down Expand Up @@ -52,8 +52,8 @@ serde_json = "*"
smartstring = "1.0.1"
state = "0.6.0"
thiserror = "1.0.58"
polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "37c630320da0d0d3270d283cdafbf6b8402de069", default-features = false }
polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "37c630320da0d0d3270d283cdafbf6b8402de069", default-features = false }
polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "5e6854171b4883418c9dbc5dd20f1bb10a23f98f", default-features = false }
polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "5e6854171b4883418c9dbc5dd20f1bb10a23f98f", default-features = false }
either = "1"
#features copied from node-polars

Expand Down Expand Up @@ -93,6 +93,7 @@ features = [
"extract_groups",
"extract_jsonpath",
"ewma",
"ewma_by",
"find_many",
"fmt",
"interpolate",
Expand Down Expand Up @@ -154,4 +155,4 @@ features = [
"zip_with",
]
git = "https://github.com/pola-rs/polars.git"
rev = "37c630320da0d0d3270d283cdafbf6b8402de069"
rev = "5e6854171b4883418c9dbc5dd20f1bb10a23f98f"
60 changes: 30 additions & 30 deletions tests/testthat/test-expr_array.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,38 @@ test_that("arr$sum", {
)
})

# TODO: reenable if the upstream issue is fixed <https://github.com/pola-rs/polars/issues/15646>
# test_that("arr$max and arr$min", {
# skip_if_not(polars_info()$features$nightly)

# df = pl$DataFrame(
# ints = list(1:2, c(1L, NA_integer_), c(NA_integer_, NA_integer_)),
# floats = list(c(1, 2), c(1, NA_real_), c(NA_real_, NA_real_)),
# schema = list(
# ints = pl$Array(pl$Int32, 2),
# floats = pl$Array(pl$Float32, 2)
# )
# )
# # max ---
# expect_identical(
# df$select(pl$col("ints")$arr$max())$to_list(),
# list(ints = c(2L, 1L, NA_integer_))
# )
# expect_identical(
# df$select(pl$col("floats")$arr$max())$to_list(),
# list(floats = c(2, 1, NA_real_))
# )
test_that("arr$max and arr$min", {
skip_if_not(polars_info()$features$nightly)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we had this flag because it used to panick but I don't think it's needed anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.
I think this could have been a bug of rustc (pola-rs/polars#14359 (comment)), but it is worth seeing if it works with the current latest release.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems working.


# # min ---
# expect_identical(
# df$select(pl$col("ints")$arr$min())$to_list(),
# list(ints = c(1L, 1L, NA_integer_))
# )
# expect_identical(
# df$select(pl$col("floats")$arr$min())$to_list(),
# list(floats = c(1, 1, NA_real_))
# )
# })
df = pl$DataFrame(
ints = list(1:2, c(1L, NA_integer_), c(NA_integer_, NA_integer_)),
floats = list(c(1, 2), c(1, NA_real_), c(NA_real_, NA_real_)),
schema = list(
ints = pl$Array(pl$Int32, 2),
floats = pl$Array(pl$Float32, 2)
)
)
# max ---
expect_identical(
df$select(pl$col("ints")$arr$max())$to_list(),
list(ints = c(2L, 1L, NA_integer_))
)
expect_identical(
df$select(pl$col("floats")$arr$max())$to_list(),
list(floats = c(2, 1, NA_real_))
)

# min ---
expect_identical(
df$select(pl$col("ints")$arr$min())$to_list(),
list(ints = c(1L, 1L, NA_integer_))
)
expect_identical(
df$select(pl$col("floats")$arr$min())$to_list(),
list(floats = c(1, 1, NA_real_))
)
})

test_that("arr$max and arr$min error if the nightly feature is false", {
skip_if(polars_info()$features$nightly)
Expand Down
6 changes: 0 additions & 6 deletions tools/lib-sums.tsv

This file was deleted.

Loading