Skip to content
Snippets Groups Projects
Unverified Commit aca3a6cf authored by Cam Saul's avatar Cam Saul Committed by GitHub
Browse files

Joins should have `:fields` `:all` by default (#32419)

parent 004ee0ab
No related branches found
No related tags found
No related merge requests found
......@@ -243,11 +243,12 @@
"Create an MBQL join map from something that can conceptually be joined against. A `Table`? An MBQL or native query? A
Saved Question? You should be able to join anything, and this should return a sensible MBQL join map."
([joinable]
;; FIXME -- we should add `:fields :all` by default, but blocked by #32026
(join-clause-method joinable))
([joinable conditions]
(with-join-conditions (join-clause joinable) conditions)))
(-> (join-clause joinable)
(u/assoc-default :fields :all)
(with-join-conditions conditions))))
(mu/defn with-join-fields :- PartialJoin
"Update a join (or a function that will return a join) to include `:fields`, either `:all`, `:none`, or a sequence of
......
......@@ -44,7 +44,8 @@
[:field
{:lib/uuid string?
:join-alias "Categories"}
(meta/id :categories :id)]]]}]}]}
(meta/id :categories :id)]]]
:fields :all}]}]}
(let [q (lib/query meta/metadata-provider (meta/table-metadata :venues))
j (lib/query meta/metadata-provider (meta/table-metadata :categories))]
(lib/join q (lib/join-clause j [{:lib/type :lib/external-op
......
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