I'm working through the following example in a lein repl in a clone from the cascalog project. I've run:
(def src [[1] [3] [2]])
(def queryx (<- [?x ?y] (src ?x) (inc ?x :> ?y)))
(?<- (stdout) [?x ?y]
(queryx ?x ?y))
-- works
(?- (stdout) queryx) ;; produces (([1 2] [2 3] [3 4]))
-- works
(?- (stdout) (first-n queryx 1 :sort ["?x"] :reverse true))
--works
But when I try this one:
(?<- (stdout) [?x ?y] (first-n queryx 1 :sort ["?x"] :reverse true))
I get
IllegalArgumentException Unable to join predicates together jackknife.core/throw-illegal (core.clj:100)
This seems to be a query creation vs execution thing. Is it possible to create a query that executes this query?