cascalog icon indicating copy to clipboard operation
cascalog copied to clipboard

midje-cascalog produces wrong output from basic queries

Open timothypratley opened this issue 10 years ago • 7 comments

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

timothypratley avatar Sep 30 '15 23:09 timothypratley

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 [email protected] 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

sritchie avatar Oct 01 '15 01:10 sritchie

@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.

timothypratley avatar Oct 01 '15 01:10 timothypratley

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 [email protected] 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

sritchie avatar Oct 01 '15 02:10 sritchie

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 avatar Nov 06 '15 03:11 danielstjules

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

danielstjules avatar Nov 06 '15 06:11 danielstjules

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.

sritchie avatar Nov 06 '15 21:11 sritchie

@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

jiyouyou125 avatar Jan 12 '16 07:01 jiyouyou125