 (defn- columns->getter-fns
   "Given a sequence of COLUMNS keywords, return a sequence of appropriate getter functions to get values from a single result row. Normally,
    these are just the keyword column names themselves, but for `:timestamp___int`, we'll also parse the result as an integer (for further
-   explanation, see the docstring for `units-that-need-post-processing-int-parsing`)."
+   explanation, see the docstring for `units-that-need-post-processing-int-parsing`). We also round `:distinct___count` in order to return an
+   integer since Druid returns the approximate floating point value for cardinality queries (See Druid documentation regarding cardinality and HLL)."
   [columns]
   (vec (for [k columns]
-         (if (not= k :timestamp___int)
-           k
-           (comp (fn [^String s]
-                   (when (seq s)
-                     (Integer/parseInt s)))
-                 k)))))
+         (case k
+            :distinct___count (comp #(Math/round %) k)
+            :timestamp___int  (comp (fn [^String s]
+                                      (when (seq s)
+                                        (Integer/parseInt s)))
+                                    k)
+            k))))
 
 (defn execute-query
   "Execute a query for a Druid DB."

                                                           {:type :fieldAccess, :fieldName :___count}]}]}

               [:distinct _] {:aggregations [{:type       :cardinality
                                              :name       :count
                                              :fieldNames [(->rvalue ag-field)]}]}
               [:sum      _] {:aggregations [(ag:doubleSum ag-field :sum)]}
               [:min      _] {:aggregations [(ag:doubleMin ag-field)]}

  (let [field             (->rvalue field)
        breakout-field    (->rvalue breakout-field)
        sort-by-breakout? (= field breakout-field)
        ag-field          (if (= ag-type :distinct) :distinct___count ag-type)]
    (assoc druid-query :metric (match [sort-by-breakout? direction]
                                 [true  :ascending]  {:type :alphaNumeric}
                                 [true  :descending] {:type :inverted, :metric {:type :alphaNumeric}}
