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.34 #442

Merged
merged 49 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
38200dc
update cargo.toml and cargo.lock
etiennebacher Oct 27, 2023
dff777a
start fixing errors on rust side [skip ci]
etiennebacher Oct 27, 2023
512e832
more fixes on rust side [skip ci]
etiennebacher Oct 27, 2023
b22bc7d
more fixes [skip ci]
etiennebacher Oct 28, 2023
12314fc
fix string cache errors on Rust side [skip ci]
etiennebacher Oct 28, 2023
b063eaf
misc fix [skip ci]
etiennebacher Oct 28, 2023
ffb346e
temporarily comment some code so that compilation isn't blocked [skip…
etiennebacher Oct 28, 2023
bf9717f
expressify some functions [skip ci]
etiennebacher Oct 28, 2023
23b54f7
replace arrow::error::Error [skip ci]
etiennebacher Oct 28, 2023
1530085
start fixing R side [skip ci]
etiennebacher Oct 28, 2023
f4f3604
$list$join() accepts expressions as "separator"
etiennebacher Oct 28, 2023
275d4ab
replace n_chars by len_chars and lengths by len_bytes
etiennebacher Oct 28, 2023
1de87a3
$dt$round() gains an arg "ambiguous"
etiennebacher Oct 28, 2023
3a4c025
forgot to make some changes for len_bytes and len_chars [skip ci]
etiennebacher Oct 28, 2023
0cd9ca6
concat_lf_diagonal now accepts to_supertypes [skip ci]
etiennebacher Oct 28, 2023
4977768
strip_chars_*() now accepts expressions [skip ci]
etiennebacher Oct 28, 2023
b9396cd
fix test for top_k / bottom_k [skip ci]
etiennebacher Oct 28, 2023
8646896
fix test for str$split_exact [skip ci]
etiennebacher Oct 28, 2023
2ce27cf
add hive_partitioning arg to scan_parquet [skip ci]
etiennebacher Oct 28, 2023
9d85196
fix tests on string cache [skip ci]
etiennebacher Oct 28, 2023
433b343
fix tests of $sum() [skip ci]
etiennebacher Oct 28, 2023
0fc8b78
fix test for $slice()
etiennebacher Oct 28, 2023
9ad1a4e
Merge branch 'main' into rust-polars-0.34
etiennebacher Oct 29, 2023
ec193f2
fix some examples
etiennebacher Oct 29, 2023
f49bdcc
bump MSRV and crate version
etiennebacher Oct 29, 2023
33cd32d
Merge branch 'main' into rust-polars-0.34
etiennebacher Oct 29, 2023
d905c7d
bump rust-polars to a later version to fix compilation issue
etiennebacher Oct 29, 2023
68fefbe
update rjust() and ljust() [skip ci]
etiennebacher Oct 29, 2023
c218c3b
add "name" subnamespace [skip ci]
etiennebacher Oct 29, 2023
75e7d4a
Merge branch 'rust-polars-0.34' of https://github.com/pola-rs/r-polar…
etiennebacher Oct 29, 2023
0008f43
Merge branch 'main' into rust-polars-0.34
etiennebacher Oct 29, 2023
c9a92f5
fix errors due to new "name" subnamespace
etiennebacher Oct 29, 2023
75da980
automatically file updates by run `GIT_DIF_TARGET=upstream/main make …
eitsupi Oct 30, 2023
7f3a302
bump MSRV to 1.73
etiennebacher Oct 30, 2023
c3ecab5
ci: ensure install the latest stable rust
eitsupi Oct 30, 2023
ede3bf2
Merge branch 'rust-polars-0.34' of github.com:pola-rs/r-polars into r…
eitsupi Oct 30, 2023
a585399
fix vignettes
etiennebacher Oct 30, 2023
2fe8fda
build: should test examples
eitsupi Oct 30, 2023
b721f58
fix: fix examples
eitsupi Oct 30, 2023
3d6ea7c
fix some docs errors
etiennebacher Oct 30, 2023
b76b996
bump news
etiennebacher Oct 30, 2023
9d54dbf
typo
etiennebacher Oct 30, 2023
a74b6af
fix: fix Series$cumsum
eitsupi Oct 31, 2023
f8ca966
chore: sync rust toolchain version to pola-rs/polars
eitsupi Oct 31, 2023
00212f8
docs: update README
eitsupi Oct 31, 2023
c8609e9
docs: tweak news
eitsupi Oct 31, 2023
865387c
refactor: remove duplicate line
eitsupi Oct 31, 2023
f0f010f
docs: add an example of reading hive-style partitioned parquet dataset
eitsupi Oct 31, 2023
d169cef
add internal RPolarsStringCacheHolder
sorhawell Oct 31, 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
6 changes: 6 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ runs:
libxml2-dev \
libssl-dev

- name: Update Rust
if: inputs.rust-nightly != 'true' && env.RPOLARS_FULL_FEATURES != 'true'
shell: bash
run: |
rustup update

- name: Set up Rust nightly toolchain
if: inputs.rust-nightly == 'true' || env.RPOLARS_FULL_FEATURES == 'true'
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Collate:
'expr__expr.R'
'expr__list.R'
'expr__meta.R'
'expr__name.R'
'expr__string.R'
'expr__struct.R'
'functions__eager.R'
Expand Down Expand Up @@ -107,4 +108,4 @@ Collate:
'zzz.R'
Config/rextendr/version: 0.3.1
VignetteBuilder: knitr
Config/polars/LibVersion: 0.33.0
Config/polars/LibVersion: 0.34.0
123 changes: 107 additions & 16 deletions LICENSE.note
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
The binary compiled from the source code of this package contains the following Rust crates:


-------------------------------------------------------------

Name: addr2line
Repository: https://github.com/gimli-rs/addr2line
Authors: addr2line authors
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: adler
Expand Down Expand Up @@ -87,13 +94,6 @@ License: Apache-2.0

-------------------------------------------------------------

Name: arrow2
Repository: https://github.com/jorgecarleitao/arrow2
Authors: Jorge C. Leitao, Apache Arrow
License: Apache-2.0

-------------------------------------------------------------

Name: async-stream
Repository: https://github.com/tokio-rs/async-stream
Authors: Carl Lerche
Expand Down Expand Up @@ -129,6 +129,13 @@ License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: backtrace
Repository: https://github.com/rust-lang/backtrace-rs
Authors: The Rust Project Developers
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: base64
Repository: https://github.com/marshallpierce/rust-base64
Authors: Alice Maz, Marshall Pierce
Expand Down Expand Up @@ -528,6 +535,13 @@ License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: gimli
Repository: https://github.com/gimli-rs/gimli
Authors: gimli authors
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: glob
Repository: https://github.com/rust-lang/glob
Authors: The Rust Project Developers
Expand All @@ -542,13 +556,6 @@ License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: hash_hasher
Repository: https://github.com/Fraser999/Hash-Hasher.git
Authors: Fraser Hutchison
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: hashbrown
Repository: https://github.com/rust-lang/hashbrown
Authors: Amanieu d'Antras
Expand All @@ -570,6 +577,13 @@ License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: hermit-abi
Repository: https://github.com/hermitcore/hermit-rs
Authors: Stefan Lankes
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: hex
Repository: https://github.com/KokaKiwi/rust-hex
Authors: KokaKiwi
Expand Down Expand Up @@ -969,6 +983,20 @@ License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: num_cpus
Repository: https://github.com/seanmonstar/num_cpus
Authors: Sean McArthur
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: object
Repository: https://github.com/gimli-rs/object
Authors: object authors
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: once_cell
Repository: https://github.com/matklad/once_cell
Authors: Aleksey Kladov
Expand Down Expand Up @@ -1018,6 +1046,13 @@ License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: percent-encoding
Repository: https://github.com/servo/rust-url/
Authors: The rust-url developers
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: phf
Repository: https://github.com/rust-phf/rust-phf
Authors: Steven Fackler
Expand Down Expand Up @@ -1062,8 +1097,8 @@ License: MIT

Name: polars-arrow
Repository: https://github.com/pola-rs/polars
Authors: Ritchie Vink
License: MIT
Authors: Jorge C. Leitao, Apache Arrow, Ritchie Vink
License:

-------------------------------------------------------------

Expand Down Expand Up @@ -1270,6 +1305,13 @@ License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: rustc-demangle
Repository: https://github.com/alexcrichton/rustc-demangle
Authors: Alex Crichton
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: rustix
Repository: https://github.com/bytecodealliance/rustix
Authors: Dan Gohman, Jakub Konka
Expand Down Expand Up @@ -1410,6 +1452,13 @@ License: BSD-3-Clause

-------------------------------------------------------------

Name: socket2
Repository: https://github.com/rust-lang/socket2
Authors: Alex Crichton, Thomas de Zeeuw
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: spin
Repository: https://github.com/mvdnes/spin-rs.git
Authors: Mathijs van de Nes, John Ericson, Joshua Barretto
Expand Down Expand Up @@ -1536,6 +1585,20 @@ License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: tokio
Repository: https://github.com/tokio-rs/tokio
Authors: Tokio Contributors
License: MIT

-------------------------------------------------------------

Name: tokio-util
Repository: https://github.com/tokio-rs/tokio
Authors: Tokio Contributors
License: MIT

-------------------------------------------------------------

Name: tracing
Repository: https://github.com/tokio-rs/tracing
Authors: Eliza Weisman, Tokio Contributors
Expand Down Expand Up @@ -1760,13 +1823,41 @@ License: BSL-1.0

-------------------------------------------------------------

Name: zerocopy
Repository: https://github.com/google/zerocopy
Authors: Joshua Liebow-Feeser
License: Apache-2.0 OR BSD-2-Clause OR MIT

-------------------------------------------------------------

Name: zerocopy-derive
Repository: https://github.com/google/zerocopy
Authors: Joshua Liebow-Feeser
License: Apache-2.0 OR BSD-2-Clause OR MIT

-------------------------------------------------------------

Name: zstd
Repository: https://github.com/gyscos/zstd-rs
Authors: Alexandre Bury
License: MIT

-------------------------------------------------------------

Name: zstd
Repository: https://github.com/gyscos/zstd-rs
Authors: Alexandre Bury
License: MIT

-------------------------------------------------------------

Name: zstd-safe
Repository: https://github.com/gyscos/zstd-rs
Authors: Alexandre Bury
License: Apache-2.0 OR MIT

-------------------------------------------------------------

Name: zstd-safe
Repository: https://github.com/gyscos/zstd-rs
Authors: Alexandre Bury
Expand Down
4 changes: 2 additions & 2 deletions 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-08-26
RUST_TOOLCHAIN_VERSION := nightly-2023-10-12

MANIFEST_PATH := src/rust/Cargo.toml

Expand Down Expand Up @@ -88,7 +88,7 @@ tools/lib-sums.tsv: ## Update the lib-sums.tsv file for pointing to the latest v

.PHONY: test
test: build install ## Run fast unittests
Rscript -e 'devtools::test()'
Rscript -e 'devtools::test(); devtools::run_examples(document = FALSE)'

.PHONY: fmt
fmt: fmt-rs fmt-r ## Format files
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ S3method("$",ExprCatNameSpace)
S3method("$",ExprDTNameSpace)
S3method("$",ExprListNameSpace)
S3method("$",ExprMetaNameSpace)
S3method("$",ExprNameNameSpace)
S3method("$",ExprStrNameSpace)
S3method("$",ExprStructNameSpace)
S3method("$",GroupBy)
Expand All @@ -24,6 +25,7 @@ S3method("$",RField)
S3method("$",RNullValues)
S3method("$",RPolarsDataType)
S3method("$",RPolarsErr)
S3method("$",RPolarsStringCacheHolder)
S3method("$",RThreadHandle)
S3method("$",Series)
S3method("$",Then)
Expand Down Expand Up @@ -70,6 +72,7 @@ S3method("[[",RField)
S3method("[[",RNullValues)
S3method("[[",RPolarsDataType)
S3method("[[",RPolarsErr)
S3method("[[",RPolarsStringCacheHolder)
S3method("[[",RThreadHandle)
S3method("[[",Series)
S3method("[[",Then)
Expand Down
21 changes: 21 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# polars (development version)

## BREAKING CHANGES DUE TO RUST-POLARS UPDATE

- rust-polars is updated to 2023-10-25 unreleased version (#442)
- New subnamespace `"name"` that contains methods `$prefix()`, `$suffix()`
`keep()` (renamed from `keep_name()`) and `map()` (renamed from `map_alias()`).
- `$dt$round()` gains an argument `ambiguous`.
- The following methods now accept an `Expr` as input: `$top_k()`, `$bottom_k()`,
`$list$join()`, `$str$strip_chars()`, `$str$strip_chars_start()`,
`$str$strip_chars_end()`, `$str$split_exact()`.
- The following methods were renamed:
- `$str$n_chars()` -> `$str$len_chars()`
- `$str$lengths()` -> `$str$len_bytes()`
- `$str$ljust()` -> `$str$pad_end()`
- `$str$rjust()` -> `$str$pad_start()`
- `$concat()` with `how = "diagonal"` now accepts an argument `to_supertypes`
to automatically convert concatenated columns to the same type.
- `pl$enable_string_cache()` doesn't take any argument anymore. The string cache
can now be disabled with `pl$disable_string_cache()`.
- `$scan_parquet()` gains an argument `hive_partitioning`.
- `$meta$tree_format()` has a better formatted output.

# polars 0.9.0

## BREAKING CHANGES DUE TO RUST-POLARS UPDATE
Expand Down
1 change: 1 addition & 0 deletions R/after-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ extendr_method_to_pure_functions = function(env, class_name = NULL) {
.pr$RNullValues = extendr_method_to_pure_functions(RNullValues)
.pr$RPolarsErr = extendr_method_to_pure_functions(RPolarsErr)
.pr$RThreadHandle = extendr_method_to_pure_functions(RThreadHandle)
.pr$RPolarsStringCacheHolder = extendr_method_to_pure_functions(RPolarsStringCacheHolder)



Expand Down
18 changes: 9 additions & 9 deletions R/dataframe__frame.R
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ DataFrame_filter = function(bool_expr) {
#' gb
#'
#' gb$agg(
#' pl$col("bar")$sum()$suffix("_sum"),
#' pl$col("bar")$sum()$name$suffix("_sum"),
#' pl$col("bar")$mean()$alias("bar_tail_sum")
#' )
DataFrame_group_by = function(..., maintain_order = pl$options$maintain_order) {
Expand Down Expand Up @@ -1522,19 +1522,19 @@ DataFrame_describe = function(percentiles = c(.25, .75)) {
result(msg = "internal error", {
# make percentile expressions
perc_exprs = lapply(
perc, \(x) pl$all()$quantile(x)$prefix(paste0(as.character(x * 100), "pct:"))
perc, \(x) pl$all()$quantile(x)$name$prefix(paste0(as.character(x * 100), "pct:"))
)

# bundle all expressions
largs = c(
list(
pl$all()$count()$prefix("count:"),
pl$all()$null_count()$prefix("null_count:"),
pl$all()$mean()$prefix("mean:"),
pl$all()$std()$prefix("std:"),
pl$all()$min()$prefix("min:"),
pl$all()$max()$prefix("max:"),
pl$all()$median()$prefix("median:")
pl$all()$count()$name$prefix("count:"),
pl$all()$null_count()$name$prefix("null_count:"),
pl$all()$mean()$name$prefix("mean:"),
pl$all()$std()$name$prefix("std:"),
pl$all()$min()$name$prefix("min:"),
pl$all()$max()$name$prefix("max:"),
pl$all()$median()$name$prefix("median:")
),
perc_exprs
)
Expand Down
Loading
Loading