             "sum"]
   :cols [(venue-col :price)
          {:base_type (id-field-type), :special_type :id, :name "sum", :id nil, :table_id nil, :description nil}]
-  :rows [[1 (->sum-field-type 1211)]
-         [2 (->sum-field-type 4066)]
-         [3 (->sum-field-type 4681)]
-         [4 (->sum-field-type 5050)]]}
+  :rows [[1 (->sum-type 1211)]
+         [2 (->sum-type 4066)]
+         [3 (->sum-type 4681)]
+         [4 (->sum-type 5050)]]}
  {:source_table (id :venues)
   :breakout     [(id :venues :price)]
   :aggregation  ["cum_sum" (id :venues :id)]})

;; ## CUMULATIVE SUM

;; TODO - Should we move this into IDataset? It's only used here, but the logic might get a little more compilcated when we add more drivers
(defn- ->sum-field-type
  "Since summed integer fields come back as different types depending on which DB we're using, cast value V appropriately."
  [v]
  (case (id-field-type)


;; ### Cumulative sum w/ a different breakout field
(qp-expect-with-all-datasets
 {:rows [["Broen Olujimi"       (->sum-type 14)]
         ["Conchúr Tihomir"     (->sum-type 21)]
         ["Dwight Gresham"      (->sum-type 34)]
         ["Felipinho Asklepios" (->sum-type 36)]
         ["Frans Hevel"         (->sum-type 46)]
         ["Kaneonuskatew Eiran" (->sum-type 49)]
         ["Kfir Caj"            (->sum-type 61)]
         ["Nils Gotam"          (->sum-type 70)]
         ["Plato Yeshua"        (->sum-type 71)]
         ["Quentin Sören"       (->sum-type 76)]
         ["Rüstem Hebel"        (->sum-type 91)]
         ["Shad Ferdynand"      (->sum-type 97)]
         ["Simcha Yan"          (->sum-type 101)]
         ["Spiros Teofil"       (->sum-type 112)]
         ["Szymon Theutrich"    (->sum-type 120)]]
  :columns [(format-name "name")
            "sum"]
  :cols [(users-col :name)
