Skip to content

Commit

Permalink
GH-38293: [R] Fix non-deterministic duckdb test (#38294)
Browse files Browse the repository at this point in the history
### Rationale for this change

The test fail with the latest version of duckdb (0.9.1).

### What changes are included in this PR?

The test was changed so that it did not depend on non-deterministic behaviour. We sort all of the other expectations involving a group_by to avoid this problem...we hadn't changed this one yet because it didn't fail in any previous version of duckdb.

### Are these changes tested?

Yes

### Are there any user-facing changes?

No
* Closes: #38293

Authored-by: Dewey Dunnington <[email protected]>
Signed-off-by: Dewey Dunnington <[email protected]>
  • Loading branch information
paleolimbot authored and raulcd committed Oct 17, 2023
1 parent e59abda commit 676b2dd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions r/tests/testthat/test-duckdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,12 @@ test_that("to_duckdb with a table", {
int_mean = mean(int, na.rm = TRUE),
dbl_mean = mean(dbl, na.rm = TRUE)
) %>%
collect(),
collect() %>%
arrange(int_mean),
tibble::tibble(
"int > 4" = c(FALSE, NA, TRUE),
int_mean = c(2, NA, 7.5),
dbl_mean = c(2.1, 4.1, 7.3)
"int > 4" = c(FALSE, TRUE, NA),
int_mean = c(2, 7.5, NA),
dbl_mean = c(2.1, 7.3, 4.1)
)
)
})
Expand Down

0 comments on commit 676b2dd

Please sign in to comment.