From 5e7c883d5e821bf284715b9181a7ef189a830955 Mon Sep 17 00:00:00 2001 From: Stepan Burlakov Date: Mon, 14 Oct 2024 13:23:17 +0300 Subject: [PATCH] round seconds-of-minute to int (#70) --- src/metabase/driver/firebolt.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metabase/driver/firebolt.clj b/src/metabase/driver/firebolt.clj index 7148e11..2a01a1d 100644 --- a/src/metabase/driver/firebolt.clj +++ b/src/metabase/driver/firebolt.clj @@ -145,7 +145,7 @@ (sql.qp/adjust-start-of-week :firebolt #(date-trunc "week" %) expr)) ; Extraction functions -(defmethod sql.qp/date [:firebolt :second-of-minute] [_ _ expr] (extract "second" expr)) +(defmethod sql.qp/date [:firebolt :second-of-minute] [_ _ expr] [:cast [:floor (extract "second" expr)] :int]) (defmethod sql.qp/date [:firebolt :minute-of-hour] [_ _ expr] (extract "minute" expr)) (defmethod sql.qp/date [:firebolt :hour-of-day] [_ _ expr] (extract "hour" expr)) (defmethod sql.qp/date [:firebolt :day-of-month] [_ _ expr] (extract "day" expr))