Skip to content
Snippets Groups Projects
Unverified Commit 87580d03 authored by Alexander Solovyov's avatar Alexander Solovyov Committed by GitHub
Browse files

add big query log processor (#34609)


fixes #31153

Co-authored-by: default avatarMayank Agarwal <mayankagarwal44442@gmail.com>
parent 7ce84d85
Branches
Tags
No related merge requests found
......@@ -830,6 +830,11 @@
(->> (sql.qp/current-datetime-honeysql-form driver)
(->temporal-type :timestamp)))
;; In BigQuery, log syntax is `log(x, base)`
(defmethod sql.qp/->honeysql [:bigquery-cloud-sdk :log]
[driver [_ field]]
(hx/call :log (sql.qp/->honeysql driver field) 10))
(defmethod sql.qp/quote-style :bigquery-cloud-sdk
[_]
:mysql)
......
......@@ -1077,3 +1077,8 @@
1234.1234567890124
1234.1234567890123456M]]
(mt/rows (mt/process-query query)))))))
(deftest ^:parallel test-bigquery-log
(testing "correct format of log10 for BigQuery"
(is (= ["log(150, 10)"]
(hsql/format-predicate (sql.qp/->honeysql :bigquery-cloud-sdk [:log 150]))))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment