Repository navigation
Conversation
srielau
force-pushed
the
SPARK-47344
branch
2 times, most recently
from
March 12, 2024 17:48
7632ecc to
b95d012
Compare
cloud-fan
reviewed
Mar 13, 2024
cloud-fan
approved these changes
Mar 13, 2024
cloud-fan
reviewed
Mar 13, 2024
cloud-fan
approved these changes
Mar 13, 2024
gengliangwang
approved these changes
Mar 13, 2024
Member
|
Thanks, merging to master |
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.
What changes were proposed in this pull request?
In this PR we propose to extend the lexing of IDENTIFIER beyond what is legitimate for unquoted identifiers to include
"plausible" identifiers. We then use the "exit" hook in the parser raise INVALID_IDENTIFIER error which is more meaningful than a syntax error.
Specifically we allow:
As part of this PR we also found that rolling
NOTand!into one token is a "bad idea".We allow:
CREATE TABLE t(c1 INT ! NULL); etc.
This is clearly not intended.
! is now ONLY allowed as a boolean prefix operator.
Why are the changes needed?
This change improves the user experience in case of an error by returning a more meaningful error.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing test suite + new unit tests
Was this patch authored or co-authored using generative AI tooling?
No