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
Is this ordering of join and aggregation really intentional? #40
Comments
Yes, that's intended. |
OK, but suppose
and this gives me an invalid query:
What's the solution to this kind of problem? Is the provider of |
The thing is, What you actually want is some more flexibility in |
@tomjaguarpaw IIRC HaskellDB will properly compose a composition like this, right? I don't have an up-and-running HaskellDB anymore to confirm, though. But my intuition is that whenever you |
Yes, HaskellDB composes these properly (modulo the many bugs which have appeared in its optimizer). If you like the sound of this kind of thing please listen out for my upcoming announcement about Opaleye which is like HaskellDB The Next Generation. It will be publically released on 1st December 2014. |
@tomjaguarpaw Aha. I thought so—it seems the criticisms of HaskellDB lie not in its relational algebra roots, but rather its sloppy implementation. A modern take on the same compositional, type-safe approach is definitely welcome. :-) |
The criticism Esqueleto makes about HaskellDB is wrt being too far from SQL. Which can be an advantage or disadvantage depending on your perspective. |
Suppose I have some queries which aggregate
[EDIT: corrected a typo in my own code above]
and then I join them, supposedly after the aggregation has been performed.
I would expect the generated SQL to be equivalent to this
However instead I get
This seems very odd to me, and an impediment to composability. Is this really the intended semantics of those queries?
The text was updated successfully, but these errors were encountered: