Cascalog 2.0 is a major improvement over 1.x. The underlying query parser remains the same but there are several notable breaking API changes. This is a guide to point out the major differences between 2.x and 1.x versions of Cascalog to help you make the upgrade.
cascalog.cascading.*
or cascalog.logic.*
cascalog.ops
→ cascalog.logic.ops
cascalog.vars
→ cascalog.logic.vars
(defmapop [times [x]] [y] (* x y))
is no longer supported in favour of using anonymous functions(c/limit [1] ...)
is now ((c/limit 1) ...)
(def src [1 2 3 4 5])
(defn square [x] (* x x))
(defn my-query [op]
(??<- [!x !y]
(src !x)
(op !x :> !y)))
(my-query #'square)
now becomes (my-query square)
Cascalog operations are now just functions, so the def*op
names have been deprecated in favor of names that sound like functions, def*fn
. A few examples: - deffilterop
→ deffilterfn
- defbufferop
→ defbufferfn
- defmapop
→ defmapfn
Let us know what was unclear or what has not been covered. Maybe you do not like the guide style or grammar or discover spelling mistakes. Reader feedback is key to making the documentation better.
This documentation site is open source and we welcome pull requests.