Fix TemplateTag id type discrepancy (#31257)
There was a discrepancy between TemplateTag id types as defined in metabase.lib.native (uuid) and metabase.mbql.schema (string). This PR makes string the uniform type for both. This results in errors when code using different specs for the same logical entity is used together. Here's an breaking example: ``` (let [card-id 328 ;; This is a valid card locally q (str "SELECT * FROM {{#" card-id "}} LIMIT 2") tt (lib-native/extract-template-tags q) res (qp/process-query {:database 1 :type :native :native {:query q :template-tags tt}})] (is (some? res))) ``` This will break since the tt generated id is a uuid but process-query expects a string id. Fixes #31252
Showing
- src/metabase/lib/native.cljc 2 additions, 2 deletionssrc/metabase/lib/native.cljc
- test/metabase/lib/native_test.cljc 14 additions, 14 deletionstest/metabase/lib/native_test.cljc
- test/metabase/query_processor_test/parameters_test.clj 14 additions, 0 deletionstest/metabase/query_processor_test/parameters_test.clj
Please register or sign in to comment