Skip to content

Commit 85fbde2

Browse files
authored
Replace once_cell::Lazy with std::sync::LazyLock (apache#14480)
1 parent 0d9f845 commit 85fbde2

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

datafusion/physical-plan/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ tokio = { workspace = true }
6868
criterion = { version = "0.5", features = ["async_futures"] }
6969
datafusion-functions-aggregate = { workspace = true }
7070
datafusion-functions-window = { workspace = true }
71-
once_cell = "1.18.0"
7271
rand = { workspace = true }
7372
rstest = { workspace = true }
7473
rstest_reuse = "0.7.0"

datafusion/physical-plan/src/joins/symmetric_hash_join.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,7 +1711,7 @@ pub enum SHJStreamState {
17111711
#[cfg(test)]
17121712
mod tests {
17131713
use std::collections::HashMap;
1714-
use std::sync::Mutex;
1714+
use std::sync::{LazyLock, Mutex};
17151715

17161716
use super::*;
17171717
use crate::joins::test_utils::{
@@ -1729,7 +1729,6 @@ mod tests {
17291729
use datafusion_physical_expr::expressions::{binary, col, lit, Column};
17301730
use datafusion_physical_expr_common::sort_expr::{LexOrdering, PhysicalSortExpr};
17311731

1732-
use once_cell::sync::Lazy;
17331732
use rstest::*;
17341733

17351734
const TABLE_SIZE: i32 = 30;
@@ -1738,8 +1737,8 @@ mod tests {
17381737
type TableValue = (Vec<RecordBatch>, Vec<RecordBatch>); // (left, right)
17391738

17401739
// Cache for storing tables
1741-
static TABLE_CACHE: Lazy<Mutex<HashMap<TableKey, TableValue>>> =
1742-
Lazy::new(|| Mutex::new(HashMap::new()));
1740+
static TABLE_CACHE: LazyLock<Mutex<HashMap<TableKey, TableValue>>> =
1741+
LazyLock::new(|| Mutex::new(HashMap::new()));
17431742

17441743
fn get_or_create_table(
17451744
cardinality: (i32, i32),

0 commit comments

Comments
 (0)