   [query]
   (validate-integer query :offset))
 
-(defn validate
-  "Check the query for any errors."
-  [query]
-  (if (or (:errors query)
-          (not (:slicedef query)))
-    query
-    (let [slicedef (:slicedef query)
-          dimensions (:dimensions slicedef)
-          metrics (:metrics slicedef)
-          column-set (set (concat dimensions metrics))]
-      (-> query
-          (assoc :errors {})
-          (validate-select column-set)
-          (validate-group column-set dimensions)
-          validate-where
-          validate-order-by
-          validate-limit
-          validate-offset))))
+(defn- post-process-validate
+  [query]
+  query)

  (let [query (validate query)]
    (if (valid? query)
      (-> query
          match
          project
          group
          sort)
      query)))

(defn- add-error
  [query field message]
  (update-in query [:errors field]
             (fnil #(conj % message) (vector))))

(defn match
  "Add the :match provision of the Mongo query. Assemble the match

            [cfpb.qu.query.select :as select]
            [cfpb.qu.query.parser :as parser]))

(declare valid? match project group sort validate post-process-validate)

(defn process
  "Process the original query through the various filters used to
