   (let [preprocessed-query (update-in query [:query] #(->> %
                                                            remove-empty-clauses
                                                            add-implicit-breakout-order-by
+                                                           add-implicit-limit
                                                            preprocess-cumulative-sum))]
     (when-not *disable-qp-logging*
       (log/debug (colorize.core/cyan "\n******************** PREPROCESSED: ********************\n"


;; ### LIMIT-MAX-RESULT-ROWS

(def ^:const max-result-rows
  "Maximum number of rows the QP should ever return."
  2000)

(defn limit-max-result-rows
  "Limit the number of rows returned in RESULTS to `max-result-rows`."
  [results]
  {:pre [(map? results)
         (sequential? (:rows results))]}

(def ^:const empty-response
  "An empty response dictionary to return when there's no query to run."
  {:rows [], :columns [], :cols []})

(def ^:const max-result-rows
  "Maximum number of rows the QP should ever return."
  10000)


;; # DYNAMIC VARS
