-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Having aggregate alias bug #2174
Conversation
…ses where we *should* resolve to an alias.
I added some additional tests to the branch that I wrote while trying to convince myself this is correct. The fundamental issue is that aggregate expressions should always prefer binding names to columns in the This can be seen in one of the examples I added:
z does not bind to a column in With this PR, that statement is an error. But it should be allowed. |
On the other hand, it looks like the added test doesn't work before this PR either, so this PR may still be making things strictly more correct. |
This one is a good test, but I'd separate it as an additive change to what I have so far select y as z from xy group by (y) having AVG(z) > 0; We can only express one group by per scope, so the |
fixes: dolthub/dolt#7082