Looks to me that you want to join data1 and data2 on "?s" and the filters
are:
(not= ?s ?s2) and (< ?u 4)
Because a cascalog query can take multiple filter predicates, you can do:
(?<- (stdout) [?u ?s] (data1 ?u ?s _) (data2 ?s ?s2) (not= ?s ?s2) (< ?u 4))
let me know if this doesn't work.
Mayank
On Mon, Jun 25, 2012 at 8:05 PM, Kunal Mishra wrote:
Hi,
I am a Cascalog enthusiast and very new to it. I am working on a project
and am struck with a query where I would like to use logical "and".
But when I use and as
(?<- (stdout) [?u ?s](data1 ?u ?s _)(data2 ?s ?s2)(and (not= ?s ?s2) (< ?u
4)))
I get the error
Can't take the value of a macro #'clojure.core/and
I then defined a function for "and"
(defn and_op [a b] (and a b))
and used that but then I got the error ?s is not defined
I would sincerely appreciate any help in this regard.
Thanks,
Kunal
Hi,
I am a Cascalog enthusiast and very new to it. I am working on a project
and am struck with a query where I would like to use logical "and".
But when I use and as
(?<- (stdout) [?u ?s](data1 ?u ?s _)(data2 ?s ?s2)(and (not= ?s ?s2) (< ?u
4)))
I get the error
Can't take the value of a macro #'clojure.core/and
I then defined a function for "and"
(defn and_op [a b] (and a b))
and used that but then I got the error ?s is not defined
I would sincerely appreciate any help in this regard.
Thanks,
Kunal