Skip to content
Snippets Groups Projects
Commit 4d93eae5 authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Explain in comment why [[nil]] is considered empty result

parent fa6f052f
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,7 @@
[card]
(let [result (:result card)]
(or (zero? (-> result :row_count))
;; Many aggregations result in [[nil]] if there are no rows to aggregate after filters
(= [[nil]]
(-> result :data :rows)))))
......
......@@ -391,6 +391,7 @@
(or (= aggregation :rows)
(contains? #{:pin_map :state :country} (:display card))) nil
(or (zero? row-count)
;; Many aggregations result in [[nil]] if there are no rows to aggregate after filters
(= [[nil]] (-> data :rows))) :empty
(and (= col-count 1)
(= row-count 1)) :scalar
......
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