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.
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
[SPARK-48530][SQL] Support for local variables in SQL Scripting #49445
base: master
Are you sure you want to change the base?
[SPARK-48530][SQL] Support for local variables in SQL Scripting #49445
Changes from all commits
73cb01b
813d282
1c08f57
18da02f
cee5f1a
47934ab
399d4e8
6efe764
769607d
6225956
241fc05
068e1ec
60335db
65b69d3
fe5dc7b
4f8d2c1
ba5b8d2
33f0aac
be6052f
4b1e8e1
90b106b
7ba0923
cd4e932
fdf3c5a
52cbd17
c134fd4
3ea762d
8e9352a
78042e3
40ffa83
4a546a4
15d5554
a2b20c5
e3077a4
6ce8f9c
ccab52c
370bf65
0cea838
9895c69
cd888dd
4fe7ab5
8a6b536
db573c1
dadd517
680e5d7
7d3008e
901aa6c
34677c7
b814b97
8074c63
220aeae
45ca867
e1f1098
61a753f
f29a8fc
e184f8c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we reuse the function that validates the label name? We can do something like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
validSessionVariableName
function will return different results depending on nameParts length. In your case we only call it when length is 2, which is correct behavior, but a little confusing in my opinion. The way it is now is easier to understand IMO.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK to have different tastes about the code style, but this is about functionality. The intention here is we skip looking up local variables if the name can never be local variables. We should check all the invalid label name patterns.