Skip to content

Conversation

@aparkerdavid
Copy link

@aparkerdavid aparkerdavid commented Jan 14, 2025

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/

@rmand97
Copy link

rmand97 commented Feb 13, 2025

@drewolson will you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants