From 462ce6c88ab066f2f3eaea3ca8e3fd530c6daf4a Mon Sep 17 00:00:00 2001 From: Stepan Burlakov Date: Wed, 16 Oct 2024 10:29:27 +0300 Subject: [PATCH] fix ddl-statements-test --- test/metabase/driver/firebolt_test.clj | 8 ++++---- test/metabase/test/data/firebolt.clj | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/metabase/driver/firebolt_test.clj b/test/metabase/driver/firebolt_test.clj index 431133e..8f9d7a1 100644 --- a/test/metabase/driver/firebolt_test.clj +++ b/test/metabase/driver/firebolt_test.clj @@ -192,13 +192,13 @@ (is (= (map #(str/replace % #"\s+" " ") ["DROP TABLE IF EXISTS \"test_data_users\"" - "CREATE DIMENSION TABLE \"test_data_users\" (\"id\" INTEGER, \"name\" String NULL, \"last_login\" DateTime NULL, \"password\" String NULL) PRIMARY INDEX \"id\"" + "CREATE DIMENSION TABLE \"test_data_users\" (\"id\" int, \"name\" text NULL, \"last_login\" timestamp NULL, \"password\" text NULL) PRIMARY INDEX \"id\"" "DROP TABLE IF EXISTS \"test_data_categories\"" - "CREATE DIMENSION TABLE \"test_data_categories\" (\"id\" INTEGER, \"name\" String NULL) PRIMARY INDEX \"id\"" + "CREATE DIMENSION TABLE \"test_data_categories\" (\"id\" int, \"name\" text NULL) PRIMARY INDEX \"id\"" "DROP TABLE IF EXISTS \"test_data_venues\"" - "CREATE DIMENSION TABLE \"test_data_venues\" (\"id\" INTEGER, \"name\" String NULL, \"category_id\" Int NULL, \"latitude\" Float NULL, \"longitude\" Float NULL, \"price\" Int NULL) PRIMARY INDEX \"id\"" + "CREATE DIMENSION TABLE \"test_data_venues\" (\"id\" int, \"name\" text NULL, \"category_id\" int NULL, \"latitude\" double precision NULL, \"longitude\" double precision NULL, \"price\" int NULL) PRIMARY INDEX \"id\"" "DROP TABLE IF EXISTS \"test_data_checkins\"" - "CREATE DIMENSION TABLE \"test_data_checkins\" (\"id\" INTEGER, \"date\" Date NULL, \"user_id\" Int NULL, \"venue_id\" Int NULL) PRIMARY INDEX \"id\""]) + "CREATE DIMENSION TABLE \"test_data_checkins\" (\"id\" int, \"date\" date NULL, \"user_id\" int NULL, \"venue_id\" int NULL) PRIMARY INDEX \"id\""]) (ddl/create-db-tables-ddl-statements :firebolt (-> (mt/get-dataset-definition dataset-defs/test-data) (update :database-name #(str %))))))))) diff --git a/test/metabase/test/data/firebolt.clj b/test/metabase/test/data/firebolt.clj index cf26e8f..7b99294 100644 --- a/test/metabase/test/data/firebolt.clj +++ b/test/metabase/test/data/firebolt.clj @@ -95,7 +95,7 @@ pk-field-name))) ; Implement this to set the type of primary key field -(defmethod sql.tx/pk-sql-type :firebolt [_] "INTEGER") +(defmethod sql.tx/pk-sql-type :firebolt [_] "int") ; I'm not sure why `driver/supports?` above doesn't rectify this, but make `add-fk-sql a noop (defmethod sql.tx/add-fk-sql :firebolt [& _] nil)