sql: support bucket_count storage parameter#76068
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Feb 5, 2022
Merged
sql: support bucket_count storage parameter#76068craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
e61e48c to
c315c2a
Compare
postamar
approved these changes
Feb 4, 2022
postamar
left a comment
There was a problem hiding this comment.
Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @ajwerner and @chengxiong-ruan)
pkg/sql/create_table.go, line 2701 at r1 (raw file):
IsPrimaryKey: true, IsSharded: d.PrimaryKey.Sharded, } /* isPK */); err != nil {
nit: remove spurious /* isPK */
c315c2a to
8c9fb49
Compare
Contributor
Author
|
pkg/sql/create_table.go, line 2701 at r1 (raw file): Previously, postamar (Marius Posta) wrote…
done, good eyes |
8c9fb49 to
b6df3d0
Compare
Contributor
Author
|
thanks for the review! |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build failed: |
A follow up of pr cockroachdb#75971 . Will send another pr to update `SHOW CREATE` output. Release note (sql change): `bucket_count` storage parameter is added. To create hash sharded index, now we may use the new syntax: `USING HASH WITH (bucket_count=xxx)`. `bucket_count` storage param can only be use together with `USING HASH`. The old `WITH BUCKET_COUNT=xxx` syntax is still supported for backward compatibility. However, only either the old or new syntax can be used, but not both. Err is returned for clause like `USING HASH WITH BUCKET_COUNT=5 WITH (bucket_count=5).
b6df3d0 to
16fadcd
Compare
Contributor
Author
|
bors r+ |
Contributor
|
Build failed: |
Contributor
Author
|
bors r+ |
Contributor
|
Build succeeded: |
chengxiong-ruan
added a commit
to chengxiong-ruan/cockroach
that referenced
this pull request
Feb 5, 2022
a follow up of pr cockroachdb#76068 Release note (sql change): We have add support for the new `bucket_count` storage param syntax. We prefer it over the old `WITH BUCKET_COUNT=xxx` syntax. With this change, crdb outputs the new syntax for `SHOW CREATE`. Though for the AST tree formatting, we still respect the old syntax if user used it.
chengxiong-ruan
added a commit
to chengxiong-ruan/cockroach
that referenced
this pull request
Feb 8, 2022
a follow up of pr cockroachdb#76068 Release note (sql change): We have add support for the new `bucket_count` storage param syntax. We prefer it over the old `WITH BUCKET_COUNT=xxx` syntax. With this change, crdb outputs the new syntax for `SHOW CREATE`. Though for the AST tree formatting, we still respect the old syntax if user used it.
craig bot
pushed a commit
that referenced
this pull request
Feb 8, 2022
75560: sql: allow non-ALL privileges to be granted WITH GRANT OPTION r=rafiss a=ecwall 75762: sql,roachpb: add plan hash correct value to persisted stats r=maryliag a=maryliag Previously, we didn't have the plan hash/gist values, so a dummy value was being used instead. Now that we have the value, this commit uses those values to be corrected stored. The Plan Hash is saved on its own column and is part of a statement key. A plan gist is a string saved in the metadata and can later on converted back into a logical plan. Partially addresses #72129 Release note (sql change): Saving plan hash/gist to the Statements persisted stats. 75880: server: better error message for tsdump initialization r=liamgillies a=liamgillies Beforehand, the error message for tsdump initialization was unclear and didn't provide enough information to support engineers on how to fix it. To address this, the error message has been revamped with instructions and commands to get tsdump working. Release note (cli change): Added instructions to an error message when initializing tsdump. 76112: sql: Replace `WITH BUCKET_COUNT` with new `bucket_count` storage param. r=chengxiong-ruan a=chengxiong-ruan a follow up of pr #76068 Release note (sql change): We have add support for the new `bucket_count` storage param syntax. We prefer it over the old `WITH BUCKET_COUNT=xxx` syntax. With this change, crdb outputs the new syntax for `SHOW CREATE`. Though for the AST tree formatting, we still respect the old syntax if user used it. 76129: geo: add pgerror codes for errors.Newf r=rafiss a=otan Release note (sql change): Added PG error codes to the majority of spatial related functions. 76242: sql/logictest: fix flakey new_schema_changer r=ajwerner a=ajwerner IDs are not deterministic due to the non-transactional nature of the descriptor ID allocator sequence. The ID wasn't really adding value to the test anyway but rather the name was interesting. Fixes #76237 Release note: None Co-authored-by: Evan Wall <wall@cockroachlabs.com> Co-authored-by: Marylia Gutierrez <marylia@cockroachlabs.com> Co-authored-by: Liam Gillies <liam.gillies@cockroachlabs.com> Co-authored-by: Chengxiong Ruan <chengxiongruan@gmail.com> Co-authored-by: Oliver Tan <otan@cockroachlabs.com> Co-authored-by: Andrew Werner <awerner32@gmail.com>
craig bot
pushed a commit
that referenced
this pull request
Feb 8, 2022
76112: sql: Replace `WITH BUCKET_COUNT` with new `bucket_count` storage param. r=chengxiong-ruan a=chengxiong-ruan a follow up of pr #76068 Release note (sql change): We have add support for the new `bucket_count` storage param syntax. We prefer it over the old `WITH BUCKET_COUNT=xxx` syntax. With this change, crdb outputs the new syntax for `SHOW CREATE`. Though for the AST tree formatting, we still respect the old syntax if user used it. Co-authored-by: Chengxiong Ruan <chengxiongruan@gmail.com>
RajivTS
pushed a commit
to RajivTS/cockroach
that referenced
this pull request
Mar 6, 2022
a follow up of pr cockroachdb#76068 Release note (sql change): We have add support for the new `bucket_count` storage param syntax. We prefer it over the old `WITH BUCKET_COUNT=xxx` syntax. With this change, crdb outputs the new syntax for `SHOW CREATE`. Though for the AST tree formatting, we still respect the old syntax if user used it.
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.
A follow up of pr #75971 .
Will send another pr to update
SHOW CREATEoutput.Release note (sql change):
bucket_countstorage parameter is added.To create hash sharded index, now we may use the new syntax:
USING HASH WITH (bucket_count=xxx).bucket_countstorage param canonly be use together with
USING HASH. The oldWITH BUCKET_COUNT=xxxsyntax is still supported for backward compatibility. However, only
either the old or new syntax can be used, but not both. Err is returned
for clause like `USING HASH WITH BUCKET_COUNT=5 WITH (bucket_count=5).