Skip to content
Snippets Groups Projects
Unverified Commit 4f1f277f authored by Cal Herries's avatar Cal Herries Committed by GitHub
Browse files

Fix error with custom column on tables sandboxed by a UUID column (#23600)

* Fix normalize-token for mbql value clauses

* Fix formatting

* Add bug link to changes
parent ad173173
Branches jest-role-hidden
No related tags found
No related merge requests found
......@@ -149,9 +149,15 @@
[[_ amount unit]]
[:interval amount (maybe-normalize-token unit)])
(defmethod normalize-mbql-clause-tokens :value
;; The args of a `value` clause shouldn't be normalized.
;; See https://github.com/metabase/metabase/issues/23354 for details
[[_ value info]]
[:value value info])
(defmethod normalize-mbql-clause-tokens :default
;; MBQL clauses by default get just the clause name normalized (e.g. `[\"COUNT\" ...]` becomes `[:count ...]`) and the
;; args are left as-is.
;; MBQL clauses by default are recursively normalized.
;; This includes the clause name (e.g. `[\"COUNT\" ...]` becomes `[:count ...]`) and args.
[[clause-name & args]]
(into [(maybe-normalize-token clause-name)] (map #(normalize-tokens % :ignore-path)) args))
......
......@@ -59,8 +59,12 @@
[:field 2 {:temporal-unit :day}]
[:field 2 {"binning" {"strategy" "default"}}]
[:field 2 {:binning {:strategy :default}}]}))
[:field 2 {:binning {:strategy :default}}]}
":value clauses should keep snake_case keys in the type info arg"
;; See https://github.com/metabase/metabase/issues/23354 for details
{[:value "some value" {:some_key "some key value"}]
[:value "some value" {:some_key "some key value"}]}))
;;; -------------------------------------------------- aggregation ---------------------------------------------------
......
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