   [{:keys [filter-type field value], :as filter}]
   {:pre [(map? filter) field]}
   (let [field (qp/formatted field)]
-    {field (case          filter-type
+    {field (case filter-type
              ;; TODO: implement Crate equivalent for "BETWEEN"
              :between     ['between [(qp/formatted (:min-val filter)) (qp/formatted (:max-val filter))]]
-             :starts-with ['like (qp/formatted (update value :value (fn [s] (str    s \%)))) ]
+             :starts-with ['like (qp/formatted (update value :value (fn [s] (str s \%))))]
              :contains    ['like (qp/formatted (update value :value (fn [s] (str \% s \%))))]
              :ends-with   ['like (qp/formatted (update value :value (fn [s] (str \% s))))]
-             :>           ['>    (qp/formatted value)]
-             :<           ['<    (qp/formatted value)]
-             :>=          ['>=   (qp/formatted value)]
-             :<=          ['<=   (qp/formatted value)]
-             :=           ['=    (qp/formatted value)]
+             :>           ['> (qp/formatted value)]
+             :<           ['< (qp/formatted value)]
+             :>=          ['>= (qp/formatted value)]
+             :<=          ['<= (qp/formatted value)]
+             :=           ['= (qp/formatted value)]
              :!=          ['not= (qp/formatted value)])}))
 
 (defn- filter-clause->predicate [{:keys [compound-type subclause subclauses], :as clause}]

  [_ korma-form {clause :filter}]
  (k/where korma-form (filter-clause->predicate clause)))

(defn- convert-to-isotime
  "Prints datetime as ISO time"
  [sql-time format]


(defn- unix-timestamp->timestamp [_ expr seconds-or-milliseconds]
  "Converts datetime string to a valid timestamp"
  (case seconds-or-milliseconds
    :seconds       (kutils/func (format "TRY_CAST('%s' as TIMESTAMP)" seconds-or-milliseconds) [expr])
    :milliseconds  (recur nil (kx// expr 1000) :seconds)))

(defn- date-trunc [unit expr]
  "date_trunc('interval', timestamp): truncates a timestamp to a given interval"
