Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax type of distinctAggregate #287

Merged
merged 1 commit into from
Oct 20, 2023
Merged

Conversation

shane-circuithub
Copy link
Contributor

The Sql DBEq a constraint on the return type of the aggregator was wrong. It also isn't quite right to have a EqTable i constraint on the input type of the Aggregator, because technically what we want is a Sql DBEq constraint on whichever column(s) within i are used by aggregation functions, but we don't know which columns were used at this point. We could give distinctAggregate a type like Sql DBEq i => Aggregator (Expr i) a and make people run it through lmap manually, but that makes it impractical to use with ListTable without exposing more machinery. So we just drop the equality constraint for now.

The `Sql DBEq a` constraint on the return type of the aggregator was wrong. It also isn't quite right to have a `EqTable i` constraint on the input type of the `Aggregator`, because technically what we want is a `Sql DBEq` constraint on whichever column(s) within `i` are used by aggregation functions, but we don't know which columns were used at this point. We could give `distinctAggregate` a type like `Sql DBEq i => Aggregator (Expr i) a` and make people run it through `lmap` manually, but that makes it impractical to use with `ListTable` without exposing more machinery. So we just drop the equality constraint for now.
@shane-circuithub shane-circuithub merged commit a744f05 into master Oct 20, 2023
2 checks passed
@shane-circuithub shane-circuithub deleted the distinctAggregate-Table branch October 20, 2023 13:22
shane-circuithub added a commit that referenced this pull request Oct 21, 2023
The `Sql DBEq a` constraint on the return type of the aggregator was wrong. It also isn't quite right to have a `EqTable i` constraint on the input type of the `Aggregator`, because technically what we want is a `Sql DBEq` constraint on whichever column(s) within `i` are used by aggregation functions, but we don't know which columns were used at this point. We could give `distinctAggregate` a type like `Sql DBEq i => Aggregator (Expr i) a` and make people run it through `lmap` manually, but that makes it impractical to use with `ListTable` without exposing more machinery. So we just drop the equality constraint for now.
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.

1 participant