Skip to content
Snippets Groups Projects
Unverified Commit 0ee8116f authored by Simon Belak's avatar Simon Belak Committed by GitHub
Browse files

Merge pull request #7875 from metabase/xrays-support-rows-aggregator

X-rays: Correctly handle legacy `[:rows]` aggregation clause
parents 01d4b457 86863111
No related branches found
No related tags found
No related merge requests found
......@@ -161,8 +161,13 @@
(def ^:private ^{:arglists '([card-or-question])} source-question
(comp Card qp.util/query->source-card-id :dataset_query))
(def ^:private ^{:arglists '([card])} table-like?
(comp empty? #(qp.util/get-in-normalized % [:dataset_query :query :aggregation])))
(defn- table-like?
[card-or-question]
(let [[aggregation & _] (qp.util/get-in-normalized card-or-question [:dataset_query :query :aggregation])]
(or (nil? aggregation)
(and (or (string? aggregation)
(keyword? aggregation))
(= (qp.util/normalize-token aggregation) :rows)))))
(defn- source
[card]
......
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