Hi, I'd like to use first-n (see http://nathanmarz.github.com/cascalog/cascalog.ops.html#var-first-n)
but I can't seem to execute the query correctly.
Straight from the example:
(def src [[1] [3] [2]]) ;; produces 3 tuples
(def query (<- [?x ?y] (src ?x) (inc ?x :> ?y))) ;; produces ([1 2] [3
4] [2 3]) when executed
(first-n query 1 :sort ["?x"] :reverse true) ;; produces ([3 4]) when
executed
user=> (first-n query 1 :sort ["?x"] :reverse true)
{:type :generator, :id "cdecc924-85da-4d58-801e-4e0e24933f54", :join-
set-var nil, :ground? true, :sourcemap {"dd1782be-1aff-4484-bd2a-
cc05ba7607b1" #<MemorySourceTap [email protected]>}, :pipe
#<Each Each(d5b525f3-48c8-49f3-bee9-99911663d910)
[Identity[decl:ARGS]]>, :outfields ["!__gen11" "!__gen12"], :trapmap
{}}
user=> (?<- (stdout) [?a] (first-n query 1 :sort ["?x"] :reverse
true))
IllegalArgumentException Unable to join predicates together
jackknife.core/throw-illegal (core.clj:100)
How can I execute this?
Thanks,
Avram