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 unreleased version #1190

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Breaking changes

- Updated rust-polars to 0.42.0 (#1183).
- Updated rust-polars to unreleased 2024-08-20, after 0.42.0 (#1183).
- `$describe_plan()` and `$describe_optimized_plan()` are removed. Use
respectively `$explain(optimized = FALSE)` and `$explain()` instead (#1182).
- The parameter `inherit_optimization` is removed from all functions that had it
Expand Down
36 changes: 18 additions & 18 deletions src/rust/Cargo.lock

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

6 changes: 3 additions & 3 deletions src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ serde_json = "*"
smartstring = "1.0.1"
state = "0.6.0"
thiserror = "1.0.63"
polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "7686025ac7738607f2d4f6887e9a1313b7c8b1e2", default-features = false }
polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "7686025ac7738607f2d4f6887e9a1313b7c8b1e2", default-features = false }
polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "67551b6594c581731f0e9ca814ff7c39377bd324", default-features = false }
polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "67551b6594c581731f0e9ca814ff7c39377bd324", default-features = false }
either = "1"

[dependencies.polars]
Expand Down Expand Up @@ -159,4 +159,4 @@ features = [
"zip_with",
]
git = "https://github.com/pola-rs/polars.git"
rev = "7686025ac7738607f2d4f6887e9a1313b7c8b1e2"
rev = "67551b6594c581731f0e9ca814ff7c39377bd324"
2 changes: 1 addition & 1 deletion src/rust/src/lazy/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ impl RPolarsLazyFrame {
fn schema(&mut self) -> RResult<Pairlist> {
let schema = self
.0
.schema()
.collect_schema()
.map_err(crate::rpolarserr::polars_to_rpolars_err)?;
let pairs = schema.iter().collect::<Vec<_>>().into_iter();
Ok(Pairlist::from_pairs(
Expand Down
2 changes: 1 addition & 1 deletion src/rust/src/rdataframe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl OwnedDataFrameIterator {
data_type,
idx: 0,
n_chunks: df.n_chunks(),
compat_level: compat_level,
compat_level,
}
}
}
Expand Down
25 changes: 12 additions & 13 deletions tests/testthat/test-parquet.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,18 @@ test_that("scanning from hive partition works", {
)
})

# TODO: https://github.com/pola-rs/polars/issues/18219
# test_that("scan_parquet can include file path", {
# skip_if_not_installed("withr")
# temp_dir = withr::local_tempdir()
# pl$DataFrame(mtcars)$write_parquet(temp_dir, partition_by = c("cyl", "gear"))
#
# # There are 8 partitions so 8 file paths
# expect_identical(
# pl$scan_parquet(temp_dir, include_file_paths = "file_paths")$collect()$unique("file_paths") |>
# dim(),
# c(8L, 12L)
# )
# })
test_that("scan_parquet can include file path", {
skip_if_not_installed("withr")
temp_dir = withr::local_tempdir()
pl$DataFrame(mtcars)$write_parquet(temp_dir, partition_by = c("cyl", "gear"))

# There are 8 partitions so 8 file paths
expect_identical(
pl$scan_parquet(temp_dir, include_file_paths = "file_paths")$collect()$unique("file_paths") |>
dim(),
c(8L, 12L)
)
})


test_that("write_parquet works", {
Expand Down
Loading