   (let [start (datetime->period t-res start)
         end (datetime->period t-res end)
         length (inc (- end start))
-        mk-fire-tseries (p/vals->sparsevec start length (FireTuple. 0 0 0 0))]
+        mk-fire-tseries (p/vals->sparsevec start length (fire-tuple 0 0 0 0))]
     (<- [?dataset ?m-res ?t-res ?tilestring ?sample ?line ?ct-series]
         (src ?dataset ?m-res ?t-res ?tilestring ?tperiod ?sample ?line ?tuple)
         (mk-fire-tseries ?tperiod ?tuple :> _ ?tseries)

(defmapop [running-fire-sum [start end]]
  "Special case of `running-sum` for `FireTuple` thrift objects."
  [tseries]
  (let [empty (FireTuple. 0 0 0 0)]
    (->> tseries
         (running-sum [] empty add-fires)
         (mk-ts start end))))

(defn add-fires
  "Adds together two FireTuple objects."
  [t1 t2]
  (fire-tuple (+ (.temp330 t1) (.temp330 t2))
              (+ (.conf50 t1) (.conf50 t2))
              (+ (.bothPreds t1) (.bothPreds t2))
              (+ (.count t1) (.count t2))))


;; Combines various fire tuples into one.
(defaggregateop comb
  ([] (fire-tuple 0 0 0 0))
  ([state tuple] (add-fires state tuple))
  ([state] [state]))

