-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Make PRIMARY a non-reserved keyword #22115
Conversation
Codenotify: Notifying subscribers in CODENOTIFY files for diff 4b453a5...0a86f27.
|
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 you add tests for a select query
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.
LGTM! (docs)
Pull branch, new local build, looks good.
0a86f27
a665469
to
0a86f27
Compare
actualResult = computeActual("SHOW CREATE TABLE " + tableName); | ||
assertEquals(getOnlyElement(actualResult.getOnlyColumnAsSet()), expectedcreateTableWithOneConstraint); | ||
// Since PRIMARY is a non-reserved keyword, it gets parsed and then fails at column resolution | ||
assertQueryFails("SELECT PRIMARY FROM " + tableName, ".*cannot be resolved.*"); |
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.
@rschlussel - is this what you had in mind?
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.
This is fine. I just meant to ensure that primary will work as a column name in a regular query.
actualResult = computeActual("SHOW CREATE TABLE " + tableName); | ||
assertEquals(getOnlyElement(actualResult.getOnlyColumnAsSet()), expectedcreateTableWithOneConstraint); | ||
// Since PRIMARY is a non-reserved keyword, it gets parsed and then fails at column resolution | ||
assertQueryFails("SELECT PRIMARY FROM " + tableName, ".*cannot be resolved.*"); |
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.
This is fine. I just meant to ensure that primary will work as a column name in a regular query.
@ClarenceThreepwood one of our tests started to fail after your changes have landed, could you check if it's related?
|
@stevechuck - Looks like this newly added test case was run with a stale build. Please upgrade and see if it reproduces |
Follow up to #20384 and #22092