Skip to content

Conversation

@zackattackz
Copy link
Contributor

  1. Refactor a large conditional branch in AshSql.Aggregate.get_subquery to use a new multi-head private function instead of nested ifs.
  2. Make it so that the case where the relationship is manual matches BEFORE the case where the relationship is no_attributes?: true

This is necessary in order to pass ash_postgres tests when running against ash with this PR applied: ash-project/ash#2562

I tested this change via the ash_postgres tests using this branch.

This should be safe to merge before the above PR, since it should only affect cases where people have defined no_attributes?: true on a manual relationship, and are aggregating through said relationship.

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

…ggregates

1. Refactor a large conditional branch in `AshSql.Aggregate.get_subquery` to use a new multi-head private function instead of nested ifs.
2. Make it so that the case where the relationship is manual matches BEFORE the case where the relationship is no_attributes?: true

This is necessary in order to pass ash_postgres tests when running against ash with this PR applied: ash-project/ash#2562
@zachdaniel zachdaniel merged commit 1ebccb6 into ash-project:main Feb 11, 2026
23 checks passed
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

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