Skip to content
Snippets Groups Projects
Commit bc390225 authored by Cam Saül's avatar Cam Saül
Browse files

Test fix for BigQuery SQL params [ci drivers]

parent 547457b8
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,8 @@
[metabase.test.data.datasets :as datasets]
[metabase.test.data.generic-sql :as generic-sql]
[metabase.test.util :as tu]
[metabase.test.data.generic-sql :as generic]))
[metabase.test.data.generic-sql :as generic]
[metabase.util :as u]))
;;; ------------------------------------------------------------ simple substitution -- {{x}} ------------------------------------------------------------
......@@ -351,12 +352,15 @@
(generic-sql/quote-name datasets/*driver* identifier))
(defn- checkins-identifier []
(let [{table-name :name, schema :schema} (db/select-one ['Table :name :schema], :id (data/id :checkins))]
(str (when (seq schema)
(str (quote-name schema) \.))
(quote-name table-name))))
;; as with the MBQL parameters tests redshift and crate fail for unknown reasons; disable their tests for now
;; HACK ! I don't have all day to write protocol methods to make this work the "right" way so for BigQuery we will just hackily return the correct identifier here
(if (= datasets/*engine* :bigquery)
"[test_data.checkins]"
(let [{table-name :name, schema :schema} (db/select-one ['Table :name :schema], :id (data/id :checkins))]
(str (when (seq schema)
(str (quote-name schema) \.))
(quote-name table-name)))))
;; as with the MBQL parameters tests Redshift and Crate fail for unknown reasons; disable their tests for now
(def ^:private ^:const sql-parameters-engines
(set/difference (engines-that-support :native-parameters) #{:redshift :crate}))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment