You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
query: :find returns one row per binding (duplicates), with no way to ask for distinct rows #493
Datalog, and Datomic in particular, give :find set semantics: this query returns two rows, and :with exists so a query can keep duplicates for aggregation. Minigraf has :with, but its default is the reverse of Datomic's, and nothing documents that.
Minigraf has no :distinct keyword or find option. The only "distinct" features are the aggregates count-distinct and sum-distinct. The workaround today is to add an aggregate, since aggregates group by the other find variables:
This adds a column the caller didn't ask for. Otherwise the caller deduplicates in their own code.
Found while widening the property tests (#386, PR #491). The test compares results as sets wherever a projection could repeat a row, so it passes under either behavior.
Keep bag semantics and add an opt-in (e.g. a :distinct query option). Nothing breaks, so it fits v3.1.0 (features). The bag default stays different from Datomic and has to be documented.
Keep current behavior and only document it in the Datalog reference, with the aggregate workaround.
In every case, the docs site's content/datalog-reference.md needs to say which behavior applies to each version.
Activity
adityamukho commentedon Oct 26, 2026
Best to stick to current behaviour, but allow a
:distinctoption, i.e. option 2.