From aedd27515927ae8a469b1374c9071a62b5fccc0d Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Thu, 21 Aug 2014 16:19:39 -0400 Subject: [PATCH] Correct compression titles for derived slices --- src/qu/loader.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qu/loader.clj b/src/qu/loader.clj index 2be82fd..5588d5f 100644 --- a/src/qu/loader.clj +++ b/src/qu/loader.clj @@ -299,10 +299,11 @@ transform that data into the form we want." fields (data/slice-columns slicedef) zip-fn (field-zip-fn slicedef) rename-map (reduce (fn [acc field] - (merge acc {(zip-fn field) field})) {} fields) + (merge acc {field (zip-fn field)})) {} fields) agg-results (mongo/command (sorted-map :aggregate from-collection :pipeline agg-query :allowDiskUse true))] (log/info "Aggregation for " slice agg-query) (log/info "Results of aggregation for" slice agg-results) + ;; Convert field names to compressed fields (coll/update slice {} {"$rename" rename-map} :multi true))) (defmethod load-slice :default