Something like this might be cleaner:

    (->> query
      (query/query->sql)
      (query/limited-query-resource-events limit)
      (set))

The `partial` with `->>` is redundant, at least.