Make PRIMARY a non-reserved keyword#22115
Conversation
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 4b453a5...0a86f27.
|
rschlussel
left a comment
There was a problem hiding this comment.
can you add tests for a select query
steveburnett
left a comment
There was a problem hiding this comment.
LGTM! (docs)
Pull branch, new local build, looks good.
0a86f27
| 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.
@rschlussel - is this what you had in mind?
There was a problem hiding this comment.
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.
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