datascript icon indicating copy to clipboard operation
datascript copied to clipboard

Multiple occurrences of query vars in pattern and aggregates

Open zoren opened this issue 3 years ago • 2 comments

With this query:

(q '[:find (count ?e) .
     :with ?i
     :where [?e :r ?e ?i]]
   [[1 :r 1 10]
    [2 :r 1 11]])

I get 1 with Datomic but 2 in datascript. It appears the test for two occurrences of a query variable is tested too late.

zoren avatar Feb 25 '22 10:02 zoren

Looks like it. Related: #336

tonsky avatar Feb 28 '22 16:02 tonsky

I think this self-unification issue is related too: https://github.com/tonsky/datascript/issues/240

refset avatar Mar 20 '23 22:03 refset