Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch committed Jul 29, 2024
1 parent 5b869c7 commit e21c1a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/metabase/driver/firebolt.clj
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
:monday)

; Modify start of week to monday
(defn- to-start-of-week [expr](extract "week" expr))
(defn- to-start-of-week [expr](date-trunc "week" expr))
(defmethod sql.qp/date [:firebolt :week] [driver _ expr] (sql.qp/adjust-start-of-week driver to-start-of-week expr))

; Return a appropriate HoneySQL form for converting a Unix timestamp integer field or value to an proper SQL Timestamp.
Expand Down Expand Up @@ -182,6 +182,7 @@
[:nest [:> [:STRPOS hsql-field hsql-value] 0]]
[:nest [:> [:STRPOS [:LOWER hsql-field] [:LOWER hsql-value]] 0]])))

; escapes all regexp characters in a string, to be later used in a regexp_extract function
(defn escape-regexp-sql [clause]
[:REGEXP_REPLACE_ALL clause "([!$()*+.:<=>?[\\\\\\]^{|}-])" "\\\\\\\\\\\\1"])

Expand Down

0 comments on commit e21c1a7

Please sign in to comment.