    ((fields-sorted-by-nameo query f1 f2))))
 
 (defn- resolve+order-cols [query]
+  {:post [(or (sequential? %)
+              (println "FAILED!\n" (u/pprint-to-str query)))]}
   (let [num-cols (count (:result-keys query))
         cols     (vec (lvars num-cols))]
     (first (run 1 [q]

    (metabase.driver/process-query {:database 67
                                    :type     :query
                                    :query    {:source_table (id :venues)
                                               :aggregation  ["sum" (id :venues :price)]
                                               :limit        10}})))

                       (map format-col)
                       add-fields-extra-info)
          columns (mapv :name cols)]
      {:cols    cols
       :columns columns
       :rows    (for [row results]
                  (mapv row columns))})))

(require 'metabase.driver)

