:limit and :offset ignored when using an aggregate function

When I call a query like:

{:query '[:find :some/id :where ...]
 :args db
 :limit 10
 :offset 7}

I get back at most 10 results just as expected.

When I do the same thing but with an aggregate function (distinct for example) like

{:query '[:find (distinct :some/id) :where ...]
 :args db
 :limit 10
 :offset 7}

I get all the values returned by the aggregate function (distinct).

1 Like