You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where (deffilter opts {:prepare true} is a shortcut which to (filter which is defined a couple of different ways depending on if you have also passed :params or not. (def or defn)
That's convenient, because you can use it like:
(trident/deftridentfndecode
[tuple coll]
...)
or;
(trident/deftridentfnwinnow-batch {:params [hosts] :preparetrue}
[conf context]
(let [keep? (some-predicate hosts)]
(trident/tridentfn
(execute [tuple coll]
... do something with keep?))))
defreduceraggregator is different, it makes no internal call to reduceraggregator for you, so you are required to:
Most (all?) of the DSL macros follow a similar pattern:
(defn clojure-filter*
(defmacro clojure-filter
(defmacro filter [& body]
(defmacro deffilter
where (deffilter opts {:prepare true} is a shortcut which to (filter which is defined a couple of different ways depending on if you have also passed :params or not. (def or defn)
That's convenient, because you can use it like:
or;
defreduceraggregator is different, it makes no internal call to reduceraggregator for you, so you are required to:
where you should probably be able to follow the same convention as others and just supply:
A minor nit, but unless i've missed something deliberate in this case I'm happy to raise a PR bringing it in line with the other macros.
The text was updated successfully, but these errors were encountered: