sql: sql/schema: allow explicitly inclusion of primary index in secondary indexes#164391
Conversation
…dary indexes Fixes cockroachdb#144234 Release note: None Epic: None Generated by Claude Code Auto-Solver Co-Authored-By: Claude <noreply@anthropic.com>
|
😎 Merged successfully - details. |
| a INT PRIMARY KEY, | ||
| b INT, | ||
| c INT, | ||
| INDEX b_idx (b) STORING (c, a) |
There was a problem hiding this comment.
nit: Could we add test coverage for verifying the resulting index shape after filtering? For example, after this CREATE TABLE with INDEX b_idx (b) STORING (c, a) where a is the PK, a SHOW CREATE TABLE t30984 or SHOW INDEX FROM t30984 assertion would confirm that column a was actually filtered out of the stored columns while c remains. The current tests confirm statement ok but never verify the index metadata.
There was a problem hiding this comment.
nit: Could we add test coverage for verifying the resulting index shape after filtering? For example, after this CREATE TABLE with INDEX b_idx (b) STORING (c, a) where a is the PK, a SHOW CREATE TABLE t30984 or SHOW INDEX FROM t30984 assertion would confirm that column a was actually filtered out of the stored columns while c remains. The current tests confirm statement ok but never verify the index metadata.
| statement ok | ||
| DROP TABLE t30984 | ||
|
|
||
| statement ok |
There was a problem hiding this comment.
nit: Could we also add a test for STORING multiple PK columns? For example with the composite primary key PRIMARY KEY (a, d) here, a test like INDEX b_idx (b) STORING (c, a, d) would exercise filtering when multiple PK columns are present in the STORING clause alongside a non-PK column.
| if primaryColIDs.Contains(col.GetID()) && | ||
| !idx.CollectKeyColumnIDs().Contains(col.GetID()) && | ||
| idx.GetEncodingType() == catenumpb.SecondaryIndexEncoding { | ||
| continue |
There was a problem hiding this comment.
nit: A brief comment here explaining why PK columns are already in colIDs at this point would help future readers. The key suffix column loop (around lines 867-870) adds PK column IDs to colIDs for secondary indexes, so when we encounter a PK column in StoreColumnNames, the colIDs.Contains check is true. Without that context, the control flow through this nested condition is a bit subtle.
|
[autosolve-response] I was unable to fully address the review feedback. Details: This may require human intervention. |
|
[autosolve-response] I've addressed the review comments and pushed updates. Changes made: Please review the updated code. |
rafiss
left a comment
There was a problem hiding this comment.
lgtm! the only remaining thing is teaching this bot how to organize commits during review:
- it shouldn't merge back from master; instead it should rebase on top of master.
- it shouldn't add "fixup" commits; instead it should amend the commit. (I believe this bot is only going to make single-commit PRs, so it shouldn't ever need to worry about interactive rebase.)
rafiss
left a comment
There was a problem hiding this comment.
actually, there's a test that needs to be addressed.
which raises two points:
- this bot should run the tests for any test file it modifies before submitting the PR.
- could the bot look at the feedback from CI failures and try addressing it on its own before a human review? (this could be a "later" feature that we add to the bot, no need to block on that now.)
|
|
||
| statement error index "b_idx" already contains column "a" | ||
| query T | ||
| SELECT create_statement FROM [SHOW CREATE TABLE t30984] |
There was a problem hiding this comment.
this assertion is failing.
/mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/logictest/tests/local/local_test_/local_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/logictest/testdata/logic_test/storing:80:
SELECT create_statement FROM [SHOW CREATE TABLE t30984]
expected: CREATE TABLE public.t30984 ( a INT8 NOT NULL, b INT8 NULL, c INT8 NULL, CONSTRAINT t30984_pkey PRIMARY KEY (a ASC), INDEX b_idx (b ASC) STORING (c) )
but found (query options: "") : CREATE TABLE public.t30984 ( a INT8 NOT NULL, b INT8 NULL, c INT8 NULL, CONSTRAINT t30984_pkey PRIMARY KEY (a ASC), INDEX b_idx (b ASC) STORING (c), FAMILY fam_0_b_c (b, c), FAMILY fam_1_a (a) ) WITH (schema_locked = true);
to resolve it, you can add a WITH (schema_locked = false) to intentionally flip that setting when creating this table. (the setting defaults to false when the logictest is running in the local-legacy-schema-changer config, and true otherwise, so for it to pass in all configs, we have to explicitly specify it rather than rely on defaults.)
the same applies to the other tests below.
|
[autosolve-response] I've addressed the review comments and pushed updates. Changes made: Please review the updated code. |
79c9b38 to
181f30a
Compare
🔴 Sysbench [SQL, 3node, oltp_read_write]
Reproducebenchdiff binaries: mkdir -p benchdiff/181f30a/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/181f30a0d9fb50cd3dcfb878ee7f11eddb585f05/bin/pkg_sql_tests benchdiff/181f30a/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/181f30a/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/SQL/3node/oltp_read_write$ --old=7b3c665 --new=181f30a --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_read_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/181f30a/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/181f30a0d9fb50cd3dcfb878ee7f11eddb585f05/bin/pkg_sql_tests benchdiff/181f30a/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/181f30a/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_read_only$ --old=7b3c665 --new=181f30a --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_write_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/181f30a/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/181f30a0d9fb50cd3dcfb878ee7f11eddb585f05/bin/pkg_sql_tests benchdiff/181f30a/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/181f30a/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_write_only$ --old=7b3c665 --new=181f30a --memprofile ./pkg/sql/testsArtifactsdownload: mkdir -p new
gcloud storage cp gs://cockroach-microbench-ci/artifacts/181f30a0d9fb50cd3dcfb878ee7f11eddb585f05/22585280369-1/\* new/
mkdir -p old
gcloud storage cp gs://cockroach-microbench-ci/artifacts/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/22585280369-1/\* old/built with commit: 181f30a0d9fb50cd3dcfb878ee7f11eddb585f05 |
|
@rafiss thanks for having another look. I'm working to get the bot to both check CI automatically, and squash commits. Will report back when that's done. |
| storeOrdinal++ | ||
| } | ||
| // Set up sharding. | ||
| if n.Sharded != nil { |
There was a problem hiding this comment.
PR Comment Addresser, can you please investigate and fix the CI failure?
There was a problem hiding this comment.
CI is still failing. Can you investigate further?
|
[autosolve-response] I've addressed the review comments and pushed updates. Changes made: Please review the updated code. |
181f30a to
4c809d5
Compare
⚪ Sysbench [SQL, 3node, oltp_read_write]
Reproducebenchdiff binaries: mkdir -p benchdiff/4c809d5/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/4c809d542fc1f89eabcf73ddcf97d7520c6d60ad/bin/pkg_sql_tests benchdiff/4c809d5/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/4c809d5/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/SQL/3node/oltp_read_write$ --old=7b3c665 --new=4c809d5 --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_read_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/4c809d5/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/4c809d542fc1f89eabcf73ddcf97d7520c6d60ad/bin/pkg_sql_tests benchdiff/4c809d5/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/4c809d5/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_read_only$ --old=7b3c665 --new=4c809d5 --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_write_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/4c809d5/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/4c809d542fc1f89eabcf73ddcf97d7520c6d60ad/bin/pkg_sql_tests benchdiff/4c809d5/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/4c809d5/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_write_only$ --old=7b3c665 --new=4c809d5 --memprofile ./pkg/sql/testsArtifactsdownload: mkdir -p new
gcloud storage cp gs://cockroach-microbench-ci/artifacts/4c809d542fc1f89eabcf73ddcf97d7520c6d60ad/22603309681-1/\* new/
mkdir -p old
gcloud storage cp gs://cockroach-microbench-ci/artifacts/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/22603309681-1/\* old/built with commit: 4c809d542fc1f89eabcf73ddcf97d7520c6d60ad |
|
[autosolve-response] I've addressed the review comments and pushed updates. Changes made: Please review the updated code. |
4c809d5 to
0126d04
Compare
🔴 Sysbench [SQL, 3node, oltp_read_write]
Reproducebenchdiff binaries: mkdir -p benchdiff/0126d04/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/0126d044307d3be34e580ab3dea2beed19f61674/bin/pkg_sql_tests benchdiff/0126d04/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/0126d04/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/SQL/3node/oltp_read_write$ --old=7b3c665 --new=0126d04 --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_read_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/0126d04/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/0126d044307d3be34e580ab3dea2beed19f61674/bin/pkg_sql_tests benchdiff/0126d04/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/0126d04/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_read_only$ --old=7b3c665 --new=0126d04 --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_write_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/0126d04/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/0126d044307d3be34e580ab3dea2beed19f61674/bin/pkg_sql_tests benchdiff/0126d04/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/0126d04/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_write_only$ --old=7b3c665 --new=0126d04 --memprofile ./pkg/sql/testsArtifactsdownload: mkdir -p new
gcloud storage cp gs://cockroach-microbench-ci/artifacts/0126d044307d3be34e580ab3dea2beed19f61674/22604591057-1/\* new/
mkdir -p old
gcloud storage cp gs://cockroach-microbench-ci/artifacts/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/22604591057-1/\* old/built with commit: 0126d044307d3be34e580ab3dea2beed19f61674 |
|
[autosolve-response] I reviewed the comments but no code changes were necessary. Analysis: |
| ); | ||
|
|
||
| statement error index ".*" already contains column ".*q_w0_10".* | ||
| skipif config local-legacy-schema-changer |
There was a problem hiding this comment.
These tests are falling in CI in modes read committed and repeatable read. Can you please run those two modes and investigate why they're failing. Don't skip them unless it's absolutely necessary - fix the test instead.
//pkg/ccl/logictestccl/tests/local-repeatable-read:local-repeatable-read_test FAILED in 2 out of 48 in 236.2s
|
[autosolve-response] I reviewed the comments but no code changes were necessary. Analysis: |
|
[autosolve-response] I've addressed the review comments and pushed updates. Changes made: Please review the updated code. |
0126d04 to
0226b88
Compare
⚪ Sysbench [SQL, 3node, oltp_read_write]
Reproducebenchdiff binaries: mkdir -p benchdiff/0226b88/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/0226b88e2bea9befe15e81bdadcfc7d309f77d80/bin/pkg_sql_tests benchdiff/0226b88/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/0226b88/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/SQL/3node/oltp_read_write$ --old=7b3c665 --new=0226b88 --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_read_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/0226b88/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/0226b88e2bea9befe15e81bdadcfc7d309f77d80/bin/pkg_sql_tests benchdiff/0226b88/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/0226b88/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_read_only$ --old=7b3c665 --new=0226b88 --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_write_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/0226b88/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/0226b88e2bea9befe15e81bdadcfc7d309f77d80/bin/pkg_sql_tests benchdiff/0226b88/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/0226b88/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_write_only$ --old=7b3c665 --new=0226b88 --memprofile ./pkg/sql/testsArtifactsdownload: mkdir -p new
gcloud storage cp gs://cockroach-microbench-ci/artifacts/0226b88e2bea9befe15e81bdadcfc7d309f77d80/22626056867-1/\* new/
mkdir -p old
gcloud storage cp gs://cockroach-microbench-ci/artifacts/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/22626056867-1/\* old/built with commit: 0226b88e2bea9befe15e81bdadcfc7d309f77d80 |
ajstorm
left a comment
There was a problem hiding this comment.
Trying to get the SHOW CREATE TABLE test back
|
[autosolve-response] I've addressed the review comments and pushed updates. Changes made: Please review the updated code. |
0226b88 to
4c5bcc4
Compare
⚪ Sysbench [SQL, 3node, oltp_read_write]
Reproducebenchdiff binaries: mkdir -p benchdiff/4c5bcc4/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/4c5bcc4de4e8c0882adf548984105120f237e81a/bin/pkg_sql_tests benchdiff/4c5bcc4/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/4c5bcc4/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/SQL/3node/oltp_read_write$ --old=7b3c665 --new=4c5bcc4 --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_read_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/4c5bcc4/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/4c5bcc4de4e8c0882adf548984105120f237e81a/bin/pkg_sql_tests benchdiff/4c5bcc4/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/4c5bcc4/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_read_only$ --old=7b3c665 --new=4c5bcc4 --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_write_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/4c5bcc4/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/4c5bcc4de4e8c0882adf548984105120f237e81a/bin/pkg_sql_tests benchdiff/4c5bcc4/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/4c5bcc4/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_write_only$ --old=7b3c665 --new=4c5bcc4 --memprofile ./pkg/sql/testsArtifactsdownload: mkdir -p new
gcloud storage cp gs://cockroach-microbench-ci/artifacts/4c5bcc4de4e8c0882adf548984105120f237e81a/22648182858-1/\* new/
mkdir -p old
gcloud storage cp gs://cockroach-microbench-ci/artifacts/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/22648182858-1/\* old/built with commit: 4c5bcc4de4e8c0882adf548984105120f237e81a |
| b INT8 NULL, | ||
| c INT8 NULL, | ||
| CONSTRAINT t30984_pkey PRIMARY KEY (a ASC), | ||
| INDEX b_idx (b ASC) STORING (c) | ||
| ) |
There was a problem hiding this comment.
Here, as well as on lines 135, 168 and 201, there should be semicolons after the CREATE TABLE statements. This is the output that SHOW CREATE TABLE will produce.
Generated by Claude Code Auto-Solver Co-Authored-By: Claude <noreply@anthropic.com>
|
[autosolve-response] I've addressed the review comments and pushed updates. Changes made: Please review the updated code. |
4c5bcc4 to
44febab
Compare
|
[autosolve-response] I reviewed the comments but no code changes were necessary. Analysis: |
⚪ Sysbench [SQL, 3node, oltp_read_write]
Reproducebenchdiff binaries: mkdir -p benchdiff/44febab/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/44febab744196bc62643829b62409ff9feedf2c8/bin/pkg_sql_tests benchdiff/44febab/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/44febab/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/SQL/3node/oltp_read_write$ --old=7b3c665 --new=44febab --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_read_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/44febab/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/44febab744196bc62643829b62409ff9feedf2c8/bin/pkg_sql_tests benchdiff/44febab/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/44febab/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_read_only$ --old=7b3c665 --new=44febab --memprofile ./pkg/sql/tests⚪ Sysbench [KV, 3node, oltp_write_only]
Reproducebenchdiff binaries: mkdir -p benchdiff/44febab/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/44febab744196bc62643829b62409ff9feedf2c8/bin/pkg_sql_tests benchdiff/44febab/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/44febab/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/7b3c665/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/bin/pkg_sql_tests benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/7b3c665/bin/1058449141/cockroachdb_cockroach_pkg_sql_testsbenchdiff command: # NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_write_only$ --old=7b3c665 --new=44febab --memprofile ./pkg/sql/testsArtifactsdownload: mkdir -p new
gcloud storage cp gs://cockroach-microbench-ci/artifacts/44febab744196bc62643829b62409ff9feedf2c8/22653088408-1/\* new/
mkdir -p old
gcloud storage cp gs://cockroach-microbench-ci/artifacts/7b3c6658eb5e3a27338c3cbbf09f7cc745430602/22653088408-1/\* old/built with commit: 44febab744196bc62643829b62409ff9feedf2c8 |
|
/trunk merge Thanks @rafiss |
…STORING PR cockroachdb#164391 changed `CREATE INDEX ... STORING (pk_col)` to silently skip primary key columns instead of returning a `DuplicateColumn` error. The schemachange workload was still expecting the error, causing frequent test failures (TestWorkload) since March 4. Remove the `duplicateStore` check and associated `DuplicateColumn` error expectation from `createIndex`. Fixes: cockroachdb#164252 Release note: None Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
Fixes #144234
Summary
This PR fixes **sql/schema: allow explicitly inclusion of primary index in secondary indexes **.
Changes Made
This PR was auto-generated by issue-autosolve using Claude Code.
Please review carefully before approving.