                     0 :none
                     1 :one
                       :many)
-        agg?      (boolean (and ag-type (not= ag-type :rows)))]
-    (match [breakouts agg?]
-      [:none false] ::select
-      [:none  true] ::timeseries
-      [:one      _] ::topN
-      [:many     _] ::groupBy)))
+        agg?      (boolean (and ag-type (not= ag-type :rows)))
+        ts?       (boolean (some #(instance? DateTimeField %) breakout-fields))]
+    (match [breakouts agg? ts?]
+      [:none  false    _] ::select
+      [:none  true     _] ::total
+      [:one   _     true] ::grouped-timeseries
+      [:one   _    false] ::topN
+      [:many  _        _] ::groupBy)))
 
 
 (defn- build-druid-query [query]


(defmethod handle-limit ::timeseries [_ {limit :limit} _]
  (when limit
    (log/warn (u/format-color 'red "WARNING: It doesn't make sense to limit an aggregate query without any breakouts, since it will always return one row. Ignoring the LIMIT clause."))))

(defmethod handle-limit ::topN [_ {limit :limit} druid-query]
  (when limit

(defmulti ^:private post-process query-type-dispatch-fn)

(defmethod post-process ::select     [_ results] (->> results first :result :events (map :event)))
(defmethod post-process ::total [_ results] (map :result results))
(defmethod post-process ::topN       [_ results] (-> results first :result))
(defmethod post-process ::groupBy    [_ results] (map :event results))

(defmethod post-process ::grouped-timeseries [_ results]
  (->> results
    (map (fn [event]
      (conj {:timestamp (:timestamp event)} (:result event)))))

(defn post-process-native
  "Post-process the results of a *native* Druid query.
