Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hantmac committed May 29, 2024
1 parent 8d9c209 commit 43f2157
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/metabase/driver/databend.clj
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,24 @@
[driver [_ arg pattern]]
[:'extract (sql.qp/->honeysql driver arg) pattern])

(defmethod sql.qp/->honeysql [:clickhouse :stddev]
(defmethod sql.qp/->honeysql [:databend :stddev]
[driver [_ field]]
[:'stddevPop (sql.qp/->honeysql driver field)])

(defmethod sql.qp/->honeysql [:clickhouse :median]
(defmethod sql.qp/->honeysql [:databend :median]
[driver [_ field]]
[:'median (sql.qp/->honeysql driver field)])

(defmethod sql.qp/->honeysql [:databend :substring]
[driver [_ arg start length]]
(let [str [:'toString (sql.qp/->honeysql driver arg)]]
(if length
[:'substring str
(sql.qp/->honeysql driver start)
(sql.qp/->honeysql driver length)]
[:'substring str
(sql.qp/->honeysql driver start)])))

;; metabase.query-processor-test.count-where-test
;; metabase.query-processor-test.share-test
(defmethod sql.qp/->honeysql [:databend :count-where]
Expand Down

0 comments on commit 43f2157

Please sign in to comment.