I'm using the join function from clojure.set
. join
with two parameters is supposed to do a natural join.
Load it up:
user=> (use 'clojure.set)
nil
This makes sense -- if either side of a join has 0 rows, so should the result:
user=> (join [{:a 1 :b 2}] [])
#{}
This also makes sense -- identically-named columns (all 0 of them :)) have the same value:
user=> (join [{:a 1 :b 2}] [{}])
#{{:a 1, :b 2}}
Same thing here:
user=> (join [{:a 1 :b 2}] [{:c 3}])
#{{:c 3, :a 1, :b 2}}
But here I get lost:
user=> (join [{:a 1 :b 2}] [{:a 2 :b 1} {}])
#{}
I joined {:a 1 :b 2}
to {}
earlier, and got a row. What am I missing?