   (:require [clojure.core.match :refer [match]]
             [clojure.tools.logging :as log]
             [korma.core :refer :all]
+            [medley.core :as m]
             [metabase.db :refer :all]
             [metabase.driver.interface :as i]
             [metabase.models.field :refer [Field field->fk-table]]

  (update-in results [:rows] (partial take max-result-rows)))


;; ### ADD-ROW-COUNT-AND-STATUS

(defn add-row-count-and-status

       (#(case (keyword (:type query))
           :native %
           :query  (post-process-cumulative-sum (:query query) %)))
       convert-timestamps-to-dates
       add-row-count-and-status))


