Merge pull request #13 from msprunck/feature/min-max-aggregators
Replace min/max by longMin, doubleMin, longMax and doubleMax
This commit is contained in:
commit
9002634bcd
2 changed files with 23 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
(defproject y42/clj-druid "0.2.13-SNAPSHOT"
|
||||
(defproject y42/clj-druid "0.2.14-SNAPSHOT"
|
||||
:description "Clojure library for Druid.io"
|
||||
:url "http://github.com/y42/clj-druid"
|
||||
:license {:name "Eclipse Public License"
|
||||
|
|
|
@ -20,15 +20,27 @@
|
|||
:name s/Str
|
||||
:fieldName s/Str})
|
||||
|
||||
(s/defschema minAggregator
|
||||
"min computes the minimum metric value"
|
||||
{:type (s/enum :min)
|
||||
(s/defschema doubleMinAggregator
|
||||
"computes the minimum of all metric values and Double.POSITIVE_INFINITY"
|
||||
{:type (s/enum :doubleMin)
|
||||
:name s/Str
|
||||
:fieldName s/Str})
|
||||
|
||||
(s/defschema maxAggregator
|
||||
"max computes the maximum metric value"
|
||||
{:type (s/enum :max)
|
||||
(s/defschema longMinAggregator
|
||||
"computes the minimum of all metric values and Long.MAX_VALUE"
|
||||
{:type (s/enum :longMin)
|
||||
:name s/Str
|
||||
:fieldName s/Str})
|
||||
|
||||
(s/defschema doubleMaxAggregator
|
||||
"computes the maximum of all metric values and Double.NEGATIVE_INFINITY"
|
||||
{:type (s/enum :doubleMax)
|
||||
:name s/Str
|
||||
:fieldName s/Str})
|
||||
|
||||
(s/defschema longMaxAggregator
|
||||
"computes the maximum of all metric values and Long.MIN_VALUE"
|
||||
{:type (s/enum :longMax)
|
||||
:name s/Str
|
||||
:fieldName s/Str})
|
||||
|
||||
|
@ -70,8 +82,10 @@ This makes it possible to compute the results of a filtered and an unfiltered ag
|
|||
#(= :count (:type %)) countAggregator
|
||||
#(= :longSum (:type %)) longSumAggregator
|
||||
#(= :doubleSum (:type %)) doubleSumAggregator
|
||||
#(= :min (:type %)) minAggregator
|
||||
#(= :max (:type %)) maxAggregator
|
||||
#(= :longMin (:type %)) longMinAggregator
|
||||
#(= :doubleMin (:type %)) doubleMinAggregator
|
||||
#(= :longMax (:type %)) longMaxAggregator
|
||||
#(= :doubleMax (:type %)) doubleMaxAggregator
|
||||
#(= :javascript (:type %)) javascriptAggregator
|
||||
#(= :cardinality (:type %)) cardinalityAggregator
|
||||
#(= :hyperUnique (:type %)) hyperUniqueAggregator
|
||||
|
|
Loading…
Reference in a new issue