Is this a correctness bug or does Datalevin have different semantics from Datascript / Datomic re. unifying _ variables in queries?
(require '[datalevin.core :as d])
(d/q '[:find ?x ?y
:where
[_ :foo ?x]
[_ :bar ?y]]
(d/db-with (d/empty-db)
[{:foo 1}
{:bar 2}
{:foo 3 :bar 4}]))
;; => #{[3 4]}
;; Datascript returns:
;; => #{[3 4] [1 4] [1 2] [3 2]}I would consider this a bug.
As _ should not be treated as a variable
ok good to know- will open a gh issue
https://github.com/tonsky/datascript/issues/490 FYI there's this separate issue I found in datascript a couple of days ago, datalevin also behaves the same way
Thanks