From 05bd2fe83caf4ffdc53b3192bd9641b5a3a488ee Mon Sep 17 00:00:00 2001 From: Steve Vaughan Jr Date: Mon, 25 Mar 2024 20:36:47 -0400 Subject: [PATCH 1/2] chore: Handle deprecation of timestamp_micros() --- core/src/execution/datafusion/expressions/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/execution/datafusion/expressions/utils.rs b/core/src/execution/datafusion/expressions/utils.rs index 30a469207..fe27f796c 100644 --- a/core/src/execution/datafusion/expressions/utils.rs +++ b/core/src/execution/datafusion/expressions/utils.rs @@ -178,7 +178,7 @@ fn pre_timestamp_cast(array: ArrayRef, timezone: String) -> ArrayRef { let datetime = as_datetime::(value).unwrap(); let offset = tz.offset_from_utc_datetime(&datetime).fix(); let datetime = datetime + offset; - datetime.timestamp_micros() + datetime.and_utc().timestamp_micros() }) }); From ac90b86be85816570a4162207ccfcd4739efab7f Mon Sep 17 00:00:00 2001 From: Steve Vaughan Jr Date: Mon, 25 Mar 2024 20:51:45 -0400 Subject: [PATCH 2/2] chore: Handle deprecation of seconds() --- core/src/execution/kernels/temporal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/execution/kernels/temporal.rs b/core/src/execution/kernels/temporal.rs index 8e454fc9e..1868c6fe5 100644 --- a/core/src/execution/kernels/temporal.rs +++ b/core/src/execution/kernels/temporal.rs @@ -203,7 +203,7 @@ where T: Datelike + Timelike + std::ops::Sub + Copy, { Some(dt) - .map(|d| d - Duration::seconds(60 * 60 * 24 * d.weekday() as i64)) + .map(|d| d - Duration::try_seconds(60 * 60 * 24 * d.weekday() as i64).unwrap()) .and_then(|d| d.with_nanosecond(0)) .and_then(|d| d.with_second(0)) .and_then(|d| d.with_minute(0))