-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: Add SHOW LOCALITY command. #39058
Conversation
|
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.
- Rather than making this a query, I think it would better if
locality
was just a new variable likenode_id
is. See here:Lines 520 to 525 in cee171c
// CockroachDB extension. `node_id`: { Get: func(evalCtx *extendedEvalContext) string { return fmt.Sprintf("%d", evalCtx.NodeID) }, }, evalCtx
. - What do we want this to show if there is no locality? Right now it's blank, which is maybe fine or maybe we would prefer "none" or something? I guess we can make a note to ask @awoods187 when he gets back.
- For commits like this with user-facing changes, you should fill out the "Release note" part of the commit message. That will be used by the docs team when they generate release notes, like this: https://www.cockroachlabs.com/docs/releases/v19.2.0-alpha.20190701.html
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @awoods187 and @solongordon)
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @awoods187, @rohany, and @solongordon)
pkg/sql/vars.go, line 516 at r1 (raw file):
return evalCtx.Locality.String() } return "No locality set."
I changed my mind, I think this is kind of weird. :) Let's just stick with the blank value.
Addresses cockroachdb#38438. `SHOW LOCALITY` returns the locality of current node. Release note (sql change): Add a `SHOW LOCALITY` command in sql.
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @awoods187 and @rohany)
bors r+ |
Build succeeded |
40258: Diagram changes for documentation r=ericharmeling a=ericharmeling Added changes to `diagrams.go` for the following statements: - `SHOW PARTITIONS` - `SHOW LOCALITY` (this change is a little hacky due to the fact that `SHOW LOCALITY` is, in fact, not defined in the SQL grammar... see #39058) - `SHOW CREATE TABLE AS` - `SHOW COLUMNS` (`WITH COMMENT`) - `SHOW DATABASES` (`WITH COMMENT`) @mjibson Adding you as reviewer because you created this generator. Release note (docs): none 43075: roachtest: update Hibernate and psycopg blacklists r=rafiss a=rafiss Hibernate now has no expected failures with our dialect, and psycopg has one fewer expected failure. closes #42819 closes #42434 Release note: None Co-authored-by: Eric Harmeling <eric.harmeling@cockroachlabs.com> Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Fixes #38438.
SHOW LOCALITY
returns the locality of the current node.Release note (sql change): Add a
SHOW LOCALITY
command in sql.