Repository navigation
fix(diagnostics): give unaliased output names their own code and help - #79
Merged
Merged
Conversation
An unaliased select item whose generated name is not verified was refused as SQ0003, an operand type problem with a cast as help. Refuse it as SQ0009 unaliased_output_name, placed on the item, with an alias as the help.
…efusals Regenerate the diagnostics reference, list SQ0009 among convert's refusals, and give it an example that stays refused once verified names convert.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
SELECT 1 FROM orders, the first thing many people type, was refused as SQ0003, an operand type problem. Its help suggested a cast and its span covered the whole statement. The real cause is the unaliased output name, which SQLQuack has not verified for that shape.Changes
unaliased_output_name, appended to the code registry and its lock. Title: "this column has no alias, and SQLQuack has not verified the name Snowflake gives it". Help: "add an alias, e.g.AS one".sqlquack explain SQ0009documents it.Verification
fensu checkpass.