chore: port MySQL bracketed SELECT in CREATE/ALTER VIEW (#4655)#2667
Merged
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Contributor
Benchmark for 3dea38fClick to view benchmark
|
## Summary - Wrap the SelectStatementSegment in MySQL CREATE VIEW and ALTER VIEW with OptionallyBracketed, so `CREATE/ALTER VIEW ... AS (SELECT ...)` parses. - Update alter_view and create_view fixtures with bracketed cases. - Advance .sqlfluff-sha through #4634 (already ported) to #4655. Ported from SQLFluff a44bea7ae99ec7f4440bfd3fa292753524a1a51b sqlfluff/sqlfluff#4655 sqlfluff/sqlfluff@a44bea7
4741f3c to
ecb42ec
Compare
Contributor
Benchmark for f265344Click to view benchmark
|
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.
Summary
SelectStatementSegmentin MySQLCREATE VIEWandALTER VIEWto be bracketed. Ported it to sqruff'smysql.rs: wrapped theSelectStatementSegmentin bothCreateViewStatementSegmentandAlterViewStatementSegmentwithOptionallyBracketed, soCREATE/ALTER VIEW ... AS (SELECT ...)now parses.create_viewandalter_viewfixtures (.sql + .yml) with the new bracketed cases; the dialect test parses all statements with no unparsable segments, producing the expectedbracketed > select_statementtree..sqlfluff-shathrough #4634 (already ported) to #4655. Parser-only change.Ported from SQLFluff a44bea7ae99ec7f4440bfd3fa292753524a1a51b
sqlfluff/sqlfluff#4655
sqlfluff/sqlfluff@a44bea7