Skip to content

Allow ambiguous column names in GroupBy and Having clauses#2271

Closed
jycor wants to merge 7 commits intomainfrom
james/groupbyhaving
Closed

Allow ambiguous column names in GroupBy and Having clauses#2271
jycor wants to merge 7 commits intomainfrom
james/groupbyhaving

Conversation

@jycor
Copy link
Contributor

@jycor jycor commented Jan 17, 2024

For some reason, MySQL allows ambiguous column names in GroupBy and Having clauses.
They just pick the left most column that matches.

This should fix 14 sqllogictests.

Correctness: dolthub/dolt#7356

@nicktobey
Copy link
Contributor

The MySQL behavior is a bit more complicated than that: I wrote about it here: dolthub/dolt#6676

@nicktobey
Copy link
Contributor

I wouldn't worry about fully matching the behavior described in the link though. As long as this only fixes sqllogictests and doesn't break any, then it makes us more correct and that's what matters.

@jycor jycor closed this Jan 31, 2024
@jycor jycor deleted the james/groupbyhaving branch January 31, 2024 19:34
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