Repository navigation
fix(syntax): leave out a create source when the statement names none - #233
Merged
Merged
Conversation
A CREATE with no source clause, such as an integration or a policy written without AS, CLONE, FROM SHARE or the like, wrote "source": "" into its tree: an invented value for a clause the SQL never had. The field is now left out of the tree when empty, the way the other optional parts of the node already are, and a create from a share still records its source keyword.
…te trees lost the empty source Leaving out an empty create source changed the parse trees of 131 approved forms and nothing else in them. Their changed trees were read again: 130 stay approved. CREATE DATA MOVEMENT RULE stays unreviewed, because its MAX_ROWS value keeps only the body and drops the written signature and RETURNS type. The baseline is re-recorded.
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
A Snowflake CREATE with no source clause, such as an integration or a policy written without AS, CLONE or FROM SHARE, wrote
"source":""into its tree. That is an invented value for a clause the SQL never had, the same kind of defect as the empty names and ALTER actions already removed. The previous PR counted forms with it as verified and named it as a known defect.Changes
CreateObject.sourceis left out of the tree when empty, like the node's other optional parts. A create from a share still recordsSHARE.Verification
"source":""is removed.MAX_ROWS AS ( ) RETURNS INTEGER -> ( 1 )keeps only the body.syntax-coverage diffexits 0;make check-cipasses on the final head.