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

Merge pull request #9196 from metabase/fix-druid-ag-references

Fix handling of references to non-count aggregations w/ Druid
parents 8524aef3 2d66b645
No related branches found
No related tags found
No related merge requests found
......@@ -61,8 +61,7 @@
this)
(defmethod ->rvalue :aggregation [[_ index]]
(let [ag (nth (:aggregation *query*) index)
ag-type (:aggregation-type ag)]
(let [[ag-type :as ag] (nth (:aggregation *query*) index)]
(cond
(= [:count] ag)
......
......@@ -897,3 +897,17 @@
(rows
(data/run-mbql-query checkins
{:aggregation [[:sum $venue_latitude] [:sum $venue_price]]}))))
;; Make sure sorting by aggregations works correctly for Timeseries queries (#9185)
(expect-with-timeseries-dbs
[["Steakhouse" 3.6]
["Chinese" 3.0]
["Wine Bar" 3.0]
["Japanese" 2.7]]
(format-rows-by [str (partial u/round-to-decimals 1)]
(rows
(data/run-mbql-query checkins
{:aggregation [[:avg $venue_price]]
:breakout [[:field-id $venue_category_name]]
:order-by [[:desc [:aggregation 0]]]
:limit 4}))))
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