From a4820978a1e5f64bbf6b761b3725e01956b09ad3 Mon Sep 17 00:00:00 2001 From: Sam Ansmink Date: Fri, 4 Oct 2024 11:24:36 +0200 Subject: [PATCH] fix small test breakage --- crates/duckdb/src/types/chrono.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/duckdb/src/types/chrono.rs b/crates/duckdb/src/types/chrono.rs index fecce4bb..fe027b6a 100644 --- a/crates/duckdb/src/types/chrono.rs +++ b/crates/duckdb/src/types/chrono.rs @@ -326,7 +326,7 @@ mod test { fn test_naive_date_time_param() -> Result<()> { let db = checked_memory_handle()?; let result: Result = db.query_row( - "SELECT 1 WHERE ? BETWEEN (now()::timestamp - INTERVAL '1 minute') AND (now()::timestamp + INTERVAL '1 minute')", + "SELECT 1 WHERE ?::TIMESTAMP BETWEEN (now()::timestamp - INTERVAL '1 minute') AND (now()::timestamp + INTERVAL '1 minute')", [Utc::now().naive_utc()], |r| r.get(0), ); @@ -339,7 +339,7 @@ mod test { let db = checked_memory_handle()?; // TODO(wangfenjin): why need 2 params? let result: Result = db.query_row( - "SELECT 1 WHERE ? BETWEEN (now()::timestamp - INTERVAL '1 minute') AND (now()::timestamp + INTERVAL '1 minute')", + "SELECT 1 WHERE ?::TIMESTAMP BETWEEN (now()::timestamp - INTERVAL '1 minute') AND (now()::timestamp + INTERVAL '1 minute')", [Utc::now()], |r| r.get(0), );