nathanmarz / cascalog

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

midje-cascalog produces wrong output from basic queries #292

Open timothypratley opened 8 years ago

timothypratley commented 8 years ago

using [cascalog/midje-cascalog "2.1.1"]

(fact
 (<- [?n]
     (num-pair :> ?n ?n))
 => (produces [[0] [1] [4]]]))
;; false, produces [[4] [4] [4]]

(?<- (stdout) [?n]
     (num-pair :> ?n ?n))
;; prints 0 1 4

Also, the tests for midje-cascalog do not run:

✘-1 ~/git/cascalog/midje-cascalog [develop|✔] 17:03 $ lein midje

-> Exception

sritchie commented 8 years ago

Well, doesn't the first clause say that it produces a single 3-tuple?

— Sent from Mailbox

On Wed, Sep 30, 2015 at 5:47 PM, Timothy Pratley notifications@github.com wrote:

using [cascalog/midje-cascalog "2.1.1"]

(fact
 (<- [?n]
     (num-pair :> ?n ?n))
 => (produces [[0 1 4]]))
;; false, produces [[4] [4] [4]]
(?<- (stdout) [?n]
     (num-pair :> ?n ?n))
;; prints 0 1 4

Reply to this email directly or view it on GitHub: https://github.com/nathanmarz/cascalog/issues/292

timothypratley commented 8 years ago

@sritchie I am expecting [[0] [1] [4]] but get [[4] [4] [4]] instead... does that clarify? num-pair is from cascalog.playground, there are pairs of 0s 1s and 4s in the num-pairs data.

sritchie commented 8 years ago

I think The library wraps the tests in a config that has io.sort.mb equal to 1. Wonder if that's what's going on.

— Sent from Mailbox

On Wed, Sep 30, 2015 at 7:43 PM, Timothy Pratley notifications@github.com wrote:

@sritchie I am expecting [[0] [1] [4]] but get [[4] [4] [4]] instead... does that clarify?

num-pair is from cascalog.playground, there are pairs of 0s 1s and 4s in the num-pairs data.

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

danielstjules commented 8 years ago

Just wondering if there's been any update on this? Is there a last known good version we could jump to? I've tried a few with no luck.

danielstjules commented 8 years ago

Turns out it's only an issue with [org.clojure/clojure "1.7.0"]. Things work fine with [org.clojure/clojure "1.6.0"] :)

sritchie commented 8 years ago

Nice, this is good to know. I don't have any time to work on this, but happy to help guide if you guys want take a stab at it and have any questions about the code.

jiyouyou125 commented 8 years ago

@sritchie add a test, test success. it seems related iterator-seq. https://github.com/nathanmarz/cascalog/pull/298 add Implicit equality constraints test,related #292