nathanmarz / cascalog

Data processing on Hadoop without the hassle.
Other
1.38k stars 179 forks source link

Negate not working? #236

Closed amanas closed 9 years ago

amanas commented 10 years ago

Please, can you make this to happen?

(fact "What!" (<- [?a ?b ?c]([["a1" "t1"] ["a3" "t3"]] ?a ?b) ([["t1" "gb"] ["t1" "es"] ["t1" "global"] ["t3" "es"] ["t3" "global"]] ?b ?c) ((ops/negate [["a3" "es"]]) ?a ?c)) => (produces [["a1" "t1" "gb"] ["a1" "t1" "es"] ["a1" "t1" "global"] ["a3" "t3" "es"] ["a3" "t3" "global"]]))

sritchie commented 9 years ago

Hey, I just ran this and I get what I'd expect:

cascalog.api> (??<- [?a ?b ?c]
      ([["a1" "t1"]
        ["a3" "t3"]] ?a ?b)
      ([["t1" "gb"]
        ["t1" "es"]
        ["t1" "global"]
        ["t3" "es"]
        ["t3" "global"]] ?b ?c)
      ((lo/negate [["a3" "es"]]) ?a ?c)) 
(["a1" "t1" "gb"] ["a1" "t1" "global"] ["a3" "t3" "global"])

Match every tuple where ?c doesn't equal "es". Is that what you were expecting?

amanas commented 9 years ago

Umm... difficult to remember what I was expecting a year ago 8)

Probably it is fine now.

Thanks sritchie.

sritchie commented 9 years ago

Sorry again about the delay :)

amanas commented 9 years ago

No please, no need to say sorry.

8)

2015-04-20 16:23 GMT+02:00 Sam Ritchie notifications@github.com:

Sorry again about the delay :)

— Reply to this email directly or view it on GitHub https://github.com/nathanmarz/cascalog/issues/236#issuecomment-94466247.