Skip to content

Commit 4cfcd28

Browse files
committed
chore: Upgrade rand crate and some other minor crates
1 parent f1ba8eb commit 4cfcd28

File tree

3 files changed

+68
-70
lines changed

3 files changed

+68
-70
lines changed

datafusion/core/tests/dataframe/mod.rs

Lines changed: 66 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,36 +3570,36 @@ async fn unnest_columns() -> Result<()> {
35703570
assert_snapshot!(
35713571
batches_to_sort_string(&results),
35723572
@r###"
3573-
+----------+------------------------------------------------+--------------------+
3574-
| shape_id | points | tags |
3575-
+----------+------------------------------------------------+--------------------+
3576-
| 1 | [{x: -3, y: -4}, {x: -3, y: 6}, {x: 2, y: -2}] | [tag1] |
3577-
| 2 | | [tag1, tag2] |
3578-
| 3 | [{x: -9, y: 2}, {x: -10, y: -4}] | |
3579-
| 4 | [{x: -3, y: 5}, {x: 2, y: -1}] | [tag1, tag2, tag3] |
3580-
+----------+------------------------------------------------+--------------------+
3581-
"###
3582-
);
3573+
+----------+---------------------------------+--------------------------+
3574+
| shape_id | points | tags |
3575+
+----------+---------------------------------+--------------------------+
3576+
| 1 | [{x: 5, y: -8}, {x: -3, y: -4}] | [tag1] |
3577+
| 2 | [{x: 6, y: 2}, {x: -2, y: -8}] | [tag1] |
3578+
| 3 | [{x: -9, y: -7}, {x: -2, y: 5}] | [tag1, tag2, tag3, tag4] |
3579+
| 4 | | [tag1, tag2, tag3] |
3580+
+----------+---------------------------------+--------------------------+
3581+
"###);
35833582

35843583
// Unnest tags
35853584
let df = table_with_nested_types(NUM_ROWS).await?;
35863585
let results = df.unnest_columns(&["tags"])?.collect().await?;
35873586
assert_snapshot!(
35883587
batches_to_sort_string(&results),
35893588
@r###"
3590-
+----------+------------------------------------------------+------+
3591-
| shape_id | points | tags |
3592-
+----------+------------------------------------------------+------+
3593-
| 1 | [{x: -3, y: -4}, {x: -3, y: 6}, {x: 2, y: -2}] | tag1 |
3594-
| 2 | | tag1 |
3595-
| 2 | | tag2 |
3596-
| 3 | [{x: -9, y: 2}, {x: -10, y: -4}] | |
3597-
| 4 | [{x: -3, y: 5}, {x: 2, y: -1}] | tag1 |
3598-
| 4 | [{x: -3, y: 5}, {x: 2, y: -1}] | tag2 |
3599-
| 4 | [{x: -3, y: 5}, {x: 2, y: -1}] | tag3 |
3600-
+----------+------------------------------------------------+------+
3601-
"###
3602-
);
3589+
+----------+---------------------------------+------+
3590+
| shape_id | points | tags |
3591+
+----------+---------------------------------+------+
3592+
| 1 | [{x: 5, y: -8}, {x: -3, y: -4}] | tag1 |
3593+
| 2 | [{x: 6, y: 2}, {x: -2, y: -8}] | tag1 |
3594+
| 3 | [{x: -9, y: -7}, {x: -2, y: 5}] | tag1 |
3595+
| 3 | [{x: -9, y: -7}, {x: -2, y: 5}] | tag2 |
3596+
| 3 | [{x: -9, y: -7}, {x: -2, y: 5}] | tag3 |
3597+
| 3 | [{x: -9, y: -7}, {x: -2, y: 5}] | tag4 |
3598+
| 4 | | tag1 |
3599+
| 4 | | tag2 |
3600+
| 4 | | tag3 |
3601+
+----------+---------------------------------+------+
3602+
"###);
36033603

36043604
// Test aggregate results for tags.
36053605
let df = table_with_nested_types(NUM_ROWS).await?;
@@ -3612,20 +3612,18 @@ async fn unnest_columns() -> Result<()> {
36123612
assert_snapshot!(
36133613
batches_to_sort_string(&results),
36143614
@r###"
3615-
+----------+-----------------+--------------------+
3616-
| shape_id | points | tags |
3617-
+----------+-----------------+--------------------+
3618-
| 1 | {x: -3, y: -4} | [tag1] |
3619-
| 1 | {x: -3, y: 6} | [tag1] |
3620-
| 1 | {x: 2, y: -2} | [tag1] |
3621-
| 2 | | [tag1, tag2] |
3622-
| 3 | {x: -10, y: -4} | |
3623-
| 3 | {x: -9, y: 2} | |
3624-
| 4 | {x: -3, y: 5} | [tag1, tag2, tag3] |
3625-
| 4 | {x: 2, y: -1} | [tag1, tag2, tag3] |
3626-
+----------+-----------------+--------------------+
3627-
"###
3628-
);
3615+
+----------+----------------+--------------------------+
3616+
| shape_id | points | tags |
3617+
+----------+----------------+--------------------------+
3618+
| 1 | {x: -3, y: -4} | [tag1] |
3619+
| 1 | {x: 5, y: -8} | [tag1] |
3620+
| 2 | {x: -2, y: -8} | [tag1] |
3621+
| 2 | {x: 6, y: 2} | [tag1] |
3622+
| 3 | {x: -2, y: 5} | [tag1, tag2, tag3, tag4] |
3623+
| 3 | {x: -9, y: -7} | [tag1, tag2, tag3, tag4] |
3624+
| 4 | | [tag1, tag2, tag3] |
3625+
+----------+----------------+--------------------------+
3626+
"###);
36293627

36303628
// Test aggregate results for points.
36313629
let df = table_with_nested_types(NUM_ROWS).await?;
@@ -3642,25 +3640,26 @@ async fn unnest_columns() -> Result<()> {
36423640
assert_snapshot!(
36433641
batches_to_sort_string(&results),
36443642
@r###"
3645-
+----------+-----------------+------+
3646-
| shape_id | points | tags |
3647-
+----------+-----------------+------+
3648-
| 1 | {x: -3, y: -4} | tag1 |
3649-
| 1 | {x: -3, y: 6} | tag1 |
3650-
| 1 | {x: 2, y: -2} | tag1 |
3651-
| 2 | | tag1 |
3652-
| 2 | | tag2 |
3653-
| 3 | {x: -10, y: -4} | |
3654-
| 3 | {x: -9, y: 2} | |
3655-
| 4 | {x: -3, y: 5} | tag1 |
3656-
| 4 | {x: -3, y: 5} | tag2 |
3657-
| 4 | {x: -3, y: 5} | tag3 |
3658-
| 4 | {x: 2, y: -1} | tag1 |
3659-
| 4 | {x: 2, y: -1} | tag2 |
3660-
| 4 | {x: 2, y: -1} | tag3 |
3661-
+----------+-----------------+------+
3662-
"###
3663-
);
3643+
+----------+----------------+------+
3644+
| shape_id | points | tags |
3645+
+----------+----------------+------+
3646+
| 1 | {x: -3, y: -4} | tag1 |
3647+
| 1 | {x: 5, y: -8} | tag1 |
3648+
| 2 | {x: -2, y: -8} | tag1 |
3649+
| 2 | {x: 6, y: 2} | tag1 |
3650+
| 3 | {x: -2, y: 5} | tag1 |
3651+
| 3 | {x: -2, y: 5} | tag2 |
3652+
| 3 | {x: -2, y: 5} | tag3 |
3653+
| 3 | {x: -2, y: 5} | tag4 |
3654+
| 3 | {x: -9, y: -7} | tag1 |
3655+
| 3 | {x: -9, y: -7} | tag2 |
3656+
| 3 | {x: -9, y: -7} | tag3 |
3657+
| 3 | {x: -9, y: -7} | tag4 |
3658+
| 4 | | tag1 |
3659+
| 4 | | tag2 |
3660+
| 4 | | tag3 |
3661+
+----------+----------------+------+
3662+
"###);
36643663

36653664
// Test aggregate results for points and tags.
36663665
let df = table_with_nested_types(NUM_ROWS).await?;
@@ -3994,15 +3993,15 @@ async fn unnest_aggregate_columns() -> Result<()> {
39943993
assert_snapshot!(
39953994
batches_to_sort_string(&results),
39963995
@r###"
3997-
+--------------------+
3998-
| tags |
3999-
+--------------------+
4000-
| |
4001-
| [tag1, tag2, tag3] |
4002-
| [tag1, tag2, tag3] |
4003-
| [tag1, tag2] |
4004-
| [tag1] |
4005-
+--------------------+
3996+
+--------------------------+
3997+
| tags |
3998+
+--------------------------+
3999+
| [tag1, tag2, tag3, tag4] |
4000+
| [tag1, tag2, tag3] |
4001+
| [tag1, tag2] |
4002+
| [tag1] |
4003+
| [tag1] |
4004+
+--------------------------+
40064005
"###
40074006
);
40084007

@@ -4018,7 +4017,7 @@ async fn unnest_aggregate_columns() -> Result<()> {
40184017
+-------------+
40194018
| count(tags) |
40204019
+-------------+
4021-
| 9 |
4020+
| 11 |
40224021
+-------------+
40234022
"###
40244023
);
@@ -4267,7 +4266,7 @@ async fn unnest_analyze_metrics() -> Result<()> {
42674266
assert_contains!(&formatted, "elapsed_compute=");
42684267
assert_contains!(&formatted, "input_batches=1");
42694268
assert_contains!(&formatted, "input_rows=5");
4270-
assert_contains!(&formatted, "output_rows=10");
4269+
assert_contains!(&formatted, "output_rows=11");
42714270
assert_contains!(&formatted, "output_batches=1");
42724271

42734272
Ok(())

datafusion/datasource-parquet/src/row_filter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,6 @@ mod test {
501501
use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;
502502
use parquet::arrow::parquet_to_arrow_schema;
503503
use parquet::file::reader::{FileReader, SerializedFileReader};
504-
use rand::{rng, Rng};
505504

506505
// We should ignore predicate that read non-primitive columns
507506
#[test]

datafusion/wasmtest/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ datafusion-optimizer = { workspace = true, default-features = true }
5353
datafusion-physical-plan = { workspace = true }
5454
datafusion-sql = { workspace = true }
5555
wasm-bindgen = "0.2.99"
56-
getrandom = { version = "=0.2.15", features = ["js"] }
56+
getrandom = { version = "0.3", features = ["wasm_js"] }
5757

5858
[patch.crates-io]
5959
# getrandom must be compiled with js feature
60-
getrandom = { version = "=0.2.15" }
60+
getrandom = { version = "0.3", features = ["wasm_js"] }
6161

6262
[dev-dependencies]
6363
insta = { workspace = true }

0 commit comments

Comments
 (0)