Skip to content

Commit

Permalink
fix ddl-statements-test
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch committed Oct 16, 2024
1 parent 739a3fd commit 462ce6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/metabase/driver/firebolt_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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 %)))))))))

Expand Down
2 changes: 1 addition & 1 deletion test/metabase/test/data/firebolt.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 462ce6c

Please sign in to comment.