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.
Fix conflicts and DataFrameFunctionsSuite #21
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
Uh oh!
There was an error while loading. Please reload this page.
Fix conflicts and DataFrameFunctionsSuite #21
Changes from 1 commit
40ffdefede05fa6fb1d43898bff2bd94419bc9b259558fc897b1b45087ad4b405508cf5cc60f433378a6891f6942fd47026bee26809d6b320b1b676aea9e87c1968a10aee601c2343f7e0a83f6c90efae3237885e615e3f3f5e846cf90271cc81ed0d31700277e006f11e4706007c31d281a8e1b626528a01856d8b2d03205750de400a8d3fa36e8bb61411de1477a36d479815a57efdb74aa8c87a5b37f1b68d819509d037497e6c149dcb8791767b7cf4482185f3c0157778b582dac19b82507a4f3c43151d9723f276f533b8ca81a56df6ee53da30d0b01ad46db4a4091993bc374d95faa02ee21e6b0f1e410b05ef45fbf255ecbb16b9f2de888229b1b8136c7222e1c3dc2d09ef269324bd349df781079339c6b0651File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
… scopes ### What changes were proposed in this pull request? We are introducing checks for unique label names. New rules for label names: - Labels can't have the same name as some of the labels in scope surrounding them - Labels can have the same name as other labels in the same scope **Valid** code: ``` BEGIN lbl: BEGIN SELECT 1; END; lbl: BEGIN SELECT 2; END; BEGIN lbl: WHILE 1=1 DO LEAVE lbl; END WHILE; END; END ``` **Invalid** code: ``` BEGIN lbl: BEGIN lbl: BEGIN SELECT 1; END; END; END ``` #### Design explanation: Even though there are _Listeners_ with `enterRule` and `exitRule` methods to check labels before and remove them from `seenLabels` after visiting node, we favor this approach because minimal changes were needed and code is more compact to avoid dependency issues. Additionally, generating label text would need to be done in 2 places and we wanted to avoid duplicated logic: - `enterRule` - `visitRule` ### Why are the changes needed? It will be needed in future when we release Local Scoped Variables for SQL Scripting so users can target variables from outer scopes if they are shadowed. ### How was this patch tested? New unit tests in 'SqlScriptingParserSuite.scala'. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#48795 from miland-db/milan-dankovic_data/unique_labels_scripting. Authored-by: Milan Dankovic <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.