scrivener_ecto icon indicating copy to clipboard operation
scrivener_ecto copied to clipboard

Fix issue that caused certain uses of `select` to break

Open aparkerdavid opened this issue 11 months ago • 1 comments

Depending on the shape of your query, Ecto may run it as a subquery when using aggregate functions. Ecto has rules for select clauses in subqueries that do not apply to queries run normally. Because Scrivener does an aggregate by count, it chokes on certain queries that Ecto wants to convert to subqueries but can't. This change addresses the issue by always ignoring select clauses when aggregating.

Ecto issue for reference: https://github.com/elixir-ecto/ecto/issues/

aparkerdavid avatar Jan 14 '25 19:01 aparkerdavid

@drewolson will you take a look at this?

rmand97 avatar Feb 13 '25 12:02 rmand97