This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 85fbde2661 Replace `once_cell::Lazy` with `std::sync::LazyLock`
(#14480)
85fbde2661 is described below
commit 85fbde2661bdb462fc498dc18f055c44f229604c
Author: Matthijs Brobbel <[email protected]>
AuthorDate: Tue Feb 4 13:28:04 2025 +0100
Replace `once_cell::Lazy` with `std::sync::LazyLock` (#14480)
---
datafusion/physical-plan/Cargo.toml | 1 -
datafusion/physical-plan/src/joins/symmetric_hash_join.rs | 7 +++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/datafusion/physical-plan/Cargo.toml
b/datafusion/physical-plan/Cargo.toml
index 83dc954953..a72d19cda3 100644
--- a/datafusion/physical-plan/Cargo.toml
+++ b/datafusion/physical-plan/Cargo.toml
@@ -68,7 +68,6 @@ tokio = { workspace = true }
criterion = { version = "0.5", features = ["async_futures"] }
datafusion-functions-aggregate = { workspace = true }
datafusion-functions-window = { workspace = true }
-once_cell = "1.18.0"
rand = { workspace = true }
rstest = { workspace = true }
rstest_reuse = "0.7.0"
diff --git a/datafusion/physical-plan/src/joins/symmetric_hash_join.rs
b/datafusion/physical-plan/src/joins/symmetric_hash_join.rs
index 2dbff25e70..59aab3395e 100644
--- a/datafusion/physical-plan/src/joins/symmetric_hash_join.rs
+++ b/datafusion/physical-plan/src/joins/symmetric_hash_join.rs
@@ -1711,7 +1711,7 @@ pub enum SHJStreamState {
#[cfg(test)]
mod tests {
use std::collections::HashMap;
- use std::sync::Mutex;
+ use std::sync::{LazyLock, Mutex};
use super::*;
use crate::joins::test_utils::{
@@ -1729,7 +1729,6 @@ mod tests {
use datafusion_physical_expr::expressions::{binary, col, lit, Column};
use datafusion_physical_expr_common::sort_expr::{LexOrdering,
PhysicalSortExpr};
- use once_cell::sync::Lazy;
use rstest::*;
const TABLE_SIZE: i32 = 30;
@@ -1738,8 +1737,8 @@ mod tests {
type TableValue = (Vec<RecordBatch>, Vec<RecordBatch>); // (left, right)
// Cache for storing tables
- static TABLE_CACHE: Lazy<Mutex<HashMap<TableKey, TableValue>>> =
- Lazy::new(|| Mutex::new(HashMap::new()));
+ static TABLE_CACHE: LazyLock<Mutex<HashMap<TableKey, TableValue>>> =
+ LazyLock::new(|| Mutex::new(HashMap::new()));
fn get_or_create_table(
cardinality: (i32, i32),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]