circuithub / rel8

Hey! Hey! Can u rel8?
https://rel8.readthedocs.io
Other
150 stars 38 forks source link

Relax type of `distinctAggregate` #287

Closed shane-circuithub closed 8 months ago

shane-circuithub commented 8 months ago

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.