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

Log warnings on ambiguous name qualification and resolution #4535

Open
fulghum opened this issue Sep 26, 2022 · 1 comment
Open

Log warnings on ambiguous name qualification and resolution #4535

fulghum opened this issue Sep 26, 2022 · 1 comment
Labels
analyzer enhancement New feature or request

Comments

@fulghum
Copy link
Contributor

fulghum commented Sep 26, 2022

In certain cases, MySQL allows ambiguity in referenced names and will register a warning for the query instead of throwing an error. GMS should follow this same behavior for consistency.

An example from MySQL's SELECT Reference Documentation:

If the HAVING clause refers to a column that is ambiguous, a warning occurs. In the following statement, col2 is ambiguous because it is used as both an alias and a column name:
SELECT COUNT(col1) AS col2 FROM t GROUP BY col2 HAVING col2 = 2;

@zachmu zachmu transferred this issue from dolthub/go-mysql-server Oct 12, 2022
@timsehn timsehn added the enhancement New feature or request label Oct 12, 2022
@max-hoffman
Copy link
Contributor

As of 1.35.9 we've fixed the ambiguity but do not log the warning here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants