Sorry for up old topic.
I am also newbie in Cascalog and I am cannot find example how to do logical
OR filter.
Something like SQL
WHERE A=1 or A=2
Thanks for help
Alexey L.
вторник, 26 июня 2012 г., 7:40:02 UTC+4 пользователь Mayank Agarwal написал:
Hi Kunal,
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 <kunal...@gmail.com<javascript:>
--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 <kunal...@gmail.com<javascript:>
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
You received this message because you are subscribed to the Google Groups "cascalog-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.