From d9cdce87c8cd1d70422cc52d40238465d6d2d73b Mon Sep 17 00:00:00 2001 From: Steven Danna Date: Thu, 25 Nov 2021 08:35:14 +0000 Subject: [PATCH 1/7] sql: require valid TenantID in start_replication_stream MakeTenantID panics if someone tries to use 0 as a tenant ID. Here, we return an error immediately in this case rather than crashing. Fixes #71311 Release note: None --- pkg/sql/sem/builtins/builtins.go | 40 ++++++++++++-------- pkg/sql/sem/builtins/replication_builtins.go | 6 ++- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/pkg/sql/sem/builtins/builtins.go b/pkg/sql/sem/builtins/builtins.go index f30a942abf61..3be0b034bfad 100644 --- a/pkg/sql/sem/builtins/builtins.go +++ b/pkg/sql/sem/builtins/builtins.go @@ -222,6 +222,14 @@ func newEncodeError(c rune, enc string) error { "character %q has no representation in encoding %q", c, enc) } +func mustBeDIntInTenantRange(e tree.Expr) (tree.DInt, error) { + tenID := tree.MustBeDInt(e) + if int64(tenID) <= 0 { + return 0, pgerror.New(pgcode.InvalidParameterValue, "tenant ID must be positive") + } + return tenID, nil +} + // builtins contains the built-in functions indexed by name. // // For use in other packages, see AllBuiltinNames and GetBuiltinProperties(). @@ -4426,9 +4434,9 @@ value if you rely on the HLC for accuracy.`, if err := requireNonNull(args[0]); err != nil { return nil, err } - sTenID := int64(tree.MustBeDInt(args[0])) - if sTenID <= 0 { - return nil, pgerror.New(pgcode.InvalidParameterValue, "tenant ID must be positive") + sTenID, err := mustBeDIntInTenantRange(args[0]) + if err != nil { + return nil, err } if err := ctx.Tenant.CreateTenant(ctx.Context, uint64(sTenID)); err != nil { return nil, err @@ -4468,9 +4476,9 @@ value if you rely on the HLC for accuracy.`, }, ReturnType: tree.FixedReturnType(types.Int), Fn: func(ctx *tree.EvalContext, args tree.Datums) (tree.Datum, error) { - sTenID := int64(tree.MustBeDInt(args[0])) - if sTenID <= 0 { - return nil, pgerror.New(pgcode.InvalidParameterValue, "tenant ID must be positive") + sTenID, err := mustBeDIntInTenantRange(args[0]) + if err != nil { + return nil, err } if err := ctx.Tenant.DestroyTenant(ctx.Context, uint64(sTenID)); err != nil { return nil, err @@ -5580,9 +5588,9 @@ value if you rely on the HLC for accuracy.`, }, ReturnType: tree.FixedReturnType(types.Int), Fn: func(ctx *tree.EvalContext, args tree.Datums) (tree.Datum, error) { - sTenID := int64(tree.MustBeDInt(args[0])) - if sTenID <= 0 { - return nil, pgerror.New(pgcode.InvalidParameterValue, "tenant ID must be positive") + sTenID, err := mustBeDIntInTenantRange(args[0]) + if err != nil { + return nil, err } if err := ctx.Tenant.GCTenant(ctx.Context, uint64(sTenID)); err != nil { return nil, err @@ -5611,9 +5619,9 @@ value if you rely on the HLC for accuracy.`, }, ReturnType: tree.FixedReturnType(types.Int), Fn: func(ctx *tree.EvalContext, args tree.Datums) (tree.Datum, error) { - sTenID := int64(tree.MustBeDInt(args[0])) - if sTenID <= 0 { - return nil, pgerror.New(pgcode.InvalidParameterValue, "tenant ID must be positive") + sTenID, err := mustBeDIntInTenantRange(args[0]) + if err != nil { + return nil, err } availableRU := float64(tree.MustBeDFloat(args[1])) refillRate := float64(tree.MustBeDFloat(args[2])) @@ -5869,8 +5877,8 @@ the locality flag on node startup. Returns an error if no region is set.`, } return tree.MakeDBool(true), nil }, - Info: `Resets the zone configuration for a multi-region table to -match its original state. No-ops if the given table ID is not a multi-region + Info: `Resets the zone configuration for a multi-region table to +match its original state. No-ops if the given table ID is not a multi-region table.`, Volatility: tree.VolatilityVolatile, }, @@ -5891,8 +5899,8 @@ table.`, } return tree.MakeDBool(true), nil }, - Info: `Resets the zone configuration for a multi-region database to -match its original state. No-ops if the given database ID is not multi-region + Info: `Resets the zone configuration for a multi-region database to +match its original state. No-ops if the given database ID is not multi-region enabled.`, Volatility: tree.VolatilityVolatile, }, diff --git a/pkg/sql/sem/builtins/replication_builtins.go b/pkg/sql/sem/builtins/replication_builtins.go index f1e86b944e78..0f76c0d297d3 100644 --- a/pkg/sql/sem/builtins/replication_builtins.go +++ b/pkg/sql/sem/builtins/replication_builtins.go @@ -84,8 +84,10 @@ var replicationBuiltins = map[string]builtinDefinition{ if err != nil { return nil, err } - - tenantID := int(tree.MustBeDInt(args[0])) + tenantID, err := mustBeDIntInTenantRange(args[0]) + if err != nil { + return nil, err + } jobID, err := mgr.StartReplicationStream(evalCtx, evalCtx.Txn, uint64(tenantID)) if err != nil { return nil, err From 32e29d48c0f3d34741c18f8d19f04c09b0a9d903 Mon Sep 17 00:00:00 2001 From: Neha George Date: Mon, 29 Nov 2021 23:47:35 -0500 Subject: [PATCH 2/7] indexrec: disable inverted index recommendations Previously, we would erroneously give index recommendations of non- inverted indexes for indexes that should be inverted. In this PR, we omit index candidates that required inverted indexes. Specifically, this includes candidates with JSON columns, array columns, and spatial data columns. Release note: None --- pkg/sql/opt/indexrec/BUILD.bazel | 2 ++ pkg/sql/opt/indexrec/index_candidate_set.go | 8 ++++++++ .../opt/indexrec/index_candidate_set_test.go | 7 ++++--- .../testdata/index-candidates-recommendations | 19 +++++++++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/pkg/sql/opt/indexrec/BUILD.bazel b/pkg/sql/opt/indexrec/BUILD.bazel index df66b0f00d20..982bb4f62546 100644 --- a/pkg/sql/opt/indexrec/BUILD.bazel +++ b/pkg/sql/opt/indexrec/BUILD.bazel @@ -14,6 +14,7 @@ go_library( "//pkg/config/zonepb", "//pkg/geo/geoindex", "//pkg/roachpb:with-mocks", + "//pkg/sql/catalog/colinfo", "//pkg/sql/catalog/descpb", "//pkg/sql/catalog/tabledesc", "//pkg/sql/opt", @@ -39,6 +40,7 @@ go_test( "//pkg/sql/opt/memo", "//pkg/sql/opt/testutils/opttester", "//pkg/sql/opt/testutils/testcat", + "//pkg/sql/types", "//pkg/util/leaktest", "//pkg/util/log", "@com_github_cockroachdb_datadriven//:datadriven", diff --git a/pkg/sql/opt/indexrec/index_candidate_set.go b/pkg/sql/opt/indexrec/index_candidate_set.go index 07464ac9ac92..c2a1d5959f78 100644 --- a/pkg/sql/opt/indexrec/index_candidate_set.go +++ b/pkg/sql/opt/indexrec/index_candidate_set.go @@ -11,6 +11,7 @@ package indexrec import ( + "github.com/cockroachdb/cockroach/pkg/sql/catalog/colinfo" "github.com/cockroachdb/cockroach/pkg/sql/opt" "github.com/cockroachdb/cockroach/pkg/sql/opt/cat" "github.com/cockroachdb/cockroach/pkg/sql/opt/memo" @@ -338,6 +339,13 @@ func addIndexToCandidates( currTable cat.Table, indexCandidates map[cat.Table][][]cat.IndexColumn, ) { + // Do not add candidates that require inverted indexes. + for _, indexCol := range newIndex { + if !colinfo.ColumnTypeIsIndexable(indexCol.Column.DatumType()) { + return + } + } + // Do not add duplicate indexes. for _, existingIndex := range indexCandidates[currTable] { if len(existingIndex) != len(newIndex) { diff --git a/pkg/sql/opt/indexrec/index_candidate_set_test.go b/pkg/sql/opt/indexrec/index_candidate_set_test.go index ae4145006ab8..57bf188d8ae9 100644 --- a/pkg/sql/opt/indexrec/index_candidate_set_test.go +++ b/pkg/sql/opt/indexrec/index_candidate_set_test.go @@ -11,6 +11,7 @@ package indexrec import ( + "github.com/cockroachdb/cockroach/pkg/sql/types" "testing" "github.com/cockroachdb/cockroach/pkg/sql/opt/cat" @@ -192,7 +193,7 @@ func testTablesAndIndexCols() ([]cat.Table, []cat.IndexColumn) { 1, "k", cat.Ordinary, - nil, + types.Bool, false, cat.Visible, nil, /* defaultExpr */ @@ -204,7 +205,7 @@ func testTablesAndIndexCols() ([]cat.Table, []cat.IndexColumn) { 2, "i", cat.Ordinary, - nil, + types.Bool, false, cat.Visible, nil, /* defaultExpr */ @@ -216,7 +217,7 @@ func testTablesAndIndexCols() ([]cat.Table, []cat.IndexColumn) { 3, "j", cat.Ordinary, - nil, + types.Bool, false, cat.Visible, nil, /* defaultExpr */ diff --git a/pkg/sql/opt/indexrec/testdata/index-candidates-recommendations b/pkg/sql/opt/indexrec/testdata/index-candidates-recommendations index b96c5bbbd425..a8ed421f9586 100644 --- a/pkg/sql/opt/indexrec/testdata/index-candidates-recommendations +++ b/pkg/sql/opt/indexrec/testdata/index-candidates-recommendations @@ -10,6 +10,25 @@ exec-ddl CREATE TABLE t3 (k INT, i INT, f FLOAT) ---- +exec-ddl +CREATE TABLE t4 (k INT, f FLOAT, j JSONB, a INT[]) +---- + +# Ensure that columns that require inverted indexes do not have candidates. This +# is temporary until we support inverted index recommendations. + +index-candidates +SELECT k, f FROM t4 WHERE j IS NULL +---- + +index-candidates +SELECT * FROM t4 WHERE k = 2 AND a IS NULL OR f > 2 +---- +t4: + (f) + (k) + (k, f) + # Ensure that new indexes do not get recommended if an identical existing # index exists. From 7e3a3e25dd70d9a12afdd441969ef303a207ca32 Mon Sep 17 00:00:00 2001 From: Neha George Date: Mon, 29 Nov 2021 16:05:52 -0500 Subject: [PATCH 3/7] sql: add index recommendation to EXPLAIN Previously, the EXPLAIN output only showed the query plan. Since users often use EXPLAIN to see why a query is poorly performing, it would be useful for them to also see index recommendations to make the query faster. In this commit, index recommendations are added to the bottom of the EXPLAIN output. See the indexrec package under `pkg/sql/opt/indexrec` to understand how index recommendations are generated. Release note (sql change): The output of the EXPLAIN SQL statement has changed. Below the plan, we now output index recommendations for the SQL statement being "EXPLAIN-ed", if there are any. These index recommendations are indexes the user could add or indexes they could replace to make the given query faster. --- .../logictestccl/testdata/logic_test/as_of | 2 +- .../logic_test/partitioning_constrained_scans | 4 +- .../testdata/logic_test/partitioning_implicit | 22 ++ pkg/sql/BUILD.bazel | 2 + pkg/sql/explain_plan.go | 6 + pkg/sql/instrumentation.go | 4 + .../opt/exec/execbuilder/testdata/aggregate | 114 ++++++-- pkg/sql/opt/exec/execbuilder/testdata/array | 4 + pkg/sql/opt/exec/execbuilder/testdata/delete | 16 ++ .../opt/exec/execbuilder/testdata/dist_union | 4 + .../opt/exec/execbuilder/testdata/distinct | 24 ++ .../opt/exec/execbuilder/testdata/distinct_on | 44 +++ .../opt/exec/execbuilder/testdata/distsql_agg | 40 +++ .../execbuilder/testdata/distsql_distinct_on | 16 ++ .../execbuilder/testdata/distsql_indexjoin | 16 ++ .../execbuilder/testdata/distsql_merge_join | 44 +++ .../execbuilder/testdata/distsql_numtables | 12 + .../execbuilder/testdata/distsql_single_flow | 16 ++ .../exec/execbuilder/testdata/distsql_union | 92 +++++++ pkg/sql/opt/exec/execbuilder/testdata/explain | 28 +- pkg/sql/opt/exec/execbuilder/testdata/fk | 12 + pkg/sql/opt/exec/execbuilder/testdata/insert | 4 + .../testdata/inverted_join_geospatial | 8 + pkg/sql/opt/exec/execbuilder/testdata/join | 176 ++++++++++++ pkg/sql/opt/exec/execbuilder/testdata/limit | 30 ++ .../opt/exec/execbuilder/testdata/lookup_join | 90 ++++++ .../execbuilder/testdata/lookup_join_spans | 92 +++++++ .../execbuilder/testdata/materialized_view | 4 + pkg/sql/opt/exec/execbuilder/testdata/orderby | 112 ++++++++ .../exec/execbuilder/testdata/partial_index | 8 + pkg/sql/opt/exec/execbuilder/testdata/scalar | 12 + ...ndary_index_column_families_nonmetamorphic | 4 + pkg/sql/opt/exec/execbuilder/testdata/select | 34 +++ .../execbuilder/testdata/select_for_update | 16 ++ .../exec/execbuilder/testdata/select_index | 152 +++++++++++ .../execbuilder/testdata/select_index_flags | 32 +++ pkg/sql/opt/exec/execbuilder/testdata/stats | 16 ++ .../opt/exec/execbuilder/testdata/subquery | 12 + .../execbuilder/testdata/subquery_correlated | 4 + pkg/sql/opt/exec/execbuilder/testdata/topk | 24 ++ pkg/sql/opt/exec/execbuilder/testdata/union | 62 +++++ pkg/sql/opt/exec/execbuilder/testdata/unique | 258 ++++++++++++++++++ pkg/sql/opt/exec/execbuilder/testdata/update | 28 ++ .../opt/exec/execbuilder/testdata/update_from | 16 ++ pkg/sql/opt/exec/execbuilder/testdata/upsert | 16 ++ .../exec/execbuilder/testdata/virtual_columns | 8 + pkg/sql/opt/exec/execbuilder/testdata/window | 8 + pkg/sql/opt/exec/execbuilder/testdata/with | 8 + .../opt/exec/execbuilder/testdata/zigzag_join | 24 ++ pkg/sql/opt/indexrec/hypothetical_index.go | 6 +- pkg/sql/opt/indexrec/hypothetical_table.go | 30 +- pkg/sql/opt/indexrec/index_candidate_set.go | 36 ++- .../opt/indexrec/index_candidate_set_test.go | 2 +- .../opt/indexrec/index_recommendation_set.go | 38 +-- .../testdata/index-candidates-recommendations | 10 + pkg/sql/opt/metadata_test.go | 2 +- pkg/sql/opt/norm/factory.go | 8 +- pkg/sql/opt/testutils/opttester/opt_tester.go | 9 +- pkg/sql/opt_catalog.go | 20 +- pkg/sql/plan_opt.go | 72 +++++ 60 files changed, 1930 insertions(+), 83 deletions(-) diff --git a/pkg/ccl/logictestccl/testdata/logic_test/as_of b/pkg/ccl/logictestccl/testdata/logic_test/as_of index 89e3300164af..a3aa1297cc76 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/as_of +++ b/pkg/ccl/logictestccl/testdata/logic_test/as_of @@ -174,7 +174,7 @@ SELECT * FROM t AS OF SYSTEM TIME with_max_staleness('1ms') WHERE j = 2 query T EXPLAIN (OPT, MEMO) SELECT * FROM t AS OF SYSTEM TIME with_max_staleness('1ms') WHERE j = 2 AND i = 1 ---- -memo (optimized, ~7KB, required=[presentation: info:6]) +memo (optimized, ~5KB, required=[presentation: info:6]) ├── G1: (explain G2 [presentation: i:1,j:2,k:3]) │ └── [presentation: info:6] │ ├── best: (explain G2="[presentation: i:1,j:2,k:3]" [presentation: i:1,j:2,k:3]) diff --git a/pkg/ccl/logictestccl/testdata/logic_test/partitioning_constrained_scans b/pkg/ccl/logictestccl/testdata/logic_test/partitioning_constrained_scans index b9d09f885073..5339726470df 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/partitioning_constrained_scans +++ b/pkg/ccl/logictestccl/testdata/logic_test/partitioning_constrained_scans @@ -80,8 +80,8 @@ select │ ├── [/3/3/1 - /3/3/9] │ └── [/3/4/1 - ] └── filters - ├── (c % 2) = 1 - └── (c > 0) AND (c < 10) + ├── (c > 0) AND (c < 10) + └── (c % 2) = 1 # Perhaps an unintuitive example. The partition constraints don't really help # constrain the index. None of the spans created by the partitioning are constrained diff --git a/pkg/ccl/logictestccl/testdata/logic_test/partitioning_implicit b/pkg/ccl/logictestccl/testdata/logic_test/partitioning_implicit index dd4faaebfb47..2a1d6b746e07 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/partitioning_implicit +++ b/pkg/ccl/logictestccl/testdata/logic_test/partitioning_implicit @@ -298,6 +298,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON t (pk); +2. type: index creation + SQL command: CREATE INDEX ON t (c); statement ok INSERT INTO fk_using_implicit_columns_against_t VALUES (1, 1, 4) @@ -799,6 +805,14 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 3 +1. type: index creation + SQL command: CREATE INDEX ON t (pk); +2. type: index creation + SQL command: CREATE INDEX ON t (b); +3. type: index creation + SQL command: CREATE INDEX ON t (c, d); statement ok INSERT INTO t VALUES (1, 1, 1, 1, 1, 1, 1), (2, 2, 2, 2, 2, 2, 2) @@ -884,6 +898,14 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 3 +1. type: index creation + SQL command: CREATE INDEX ON t (pk) STORING (pk2, a, b, c, d); +2. type: index creation + SQL command: CREATE INDEX ON t (b); +3. type: index creation + SQL command: CREATE INDEX ON t (c, d); # One row already exists, one row is new. statement ok diff --git a/pkg/sql/BUILD.bazel b/pkg/sql/BUILD.bazel index 575014d24f2c..be9f7efc5923 100644 --- a/pkg/sql/BUILD.bazel +++ b/pkg/sql/BUILD.bazel @@ -328,7 +328,9 @@ go_library( "//pkg/sql/opt/exec", "//pkg/sql/opt/exec/execbuilder", "//pkg/sql/opt/exec/explain", + "//pkg/sql/opt/indexrec", "//pkg/sql/opt/memo", + "//pkg/sql/opt/norm", "//pkg/sql/opt/optbuilder", "//pkg/sql/opt/xform", "//pkg/sql/optionalnodeliveness", diff --git a/pkg/sql/explain_plan.go b/pkg/sql/explain_plan.go index de2b9218d4ba..e4d93018f8f3 100644 --- a/pkg/sql/explain_plan.go +++ b/pkg/sql/explain_plan.go @@ -135,6 +135,12 @@ func (e *explainPlanNode) startExec(params runParams) error { } } } + // Add index recommendations to output, if they exist. + if params.p.instrumentation.indexRecommendations != nil { + // First add empty row. + rows = append(rows, "") + rows = append(rows, params.p.instrumentation.indexRecommendations...) + } v := params.p.newContainerValuesNode(colinfo.ExplainPlanColumns, 0) datums := make([]tree.DString, len(rows)) for i, row := range rows { diff --git a/pkg/sql/instrumentation.go b/pkg/sql/instrumentation.go index 605ecafaa29b..9a82af4cea2a 100644 --- a/pkg/sql/instrumentation.go +++ b/pkg/sql/instrumentation.go @@ -123,6 +123,10 @@ type instrumentationHelper struct { // costEstimate is the cost of the query as estimated by the optimizer. costEstimate float64 + + // indexRecommendations is a string slice containing index recommendations for + // the planned statement. This is only set for EXPLAIN statements. + indexRecommendations []string } // outputMode indicates how the statement output needs to be populated (for diff --git a/pkg/sql/opt/exec/execbuilder/testdata/aggregate b/pkg/sql/opt/exec/execbuilder/testdata/aggregate index 9cc0fb92108e..b99e0c06150e 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/aggregate +++ b/pkg/sql/opt/exec/execbuilder/testdata/aggregate @@ -676,6 +676,10 @@ vectorized: true table: xyz@zyx spans: /7/!NULL-/7.000000000000001 limit: 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (z) STORING (y); query T EXPLAIN (TYPES) SELECT max(y) FROM xyz WHERE z = 7 @@ -697,6 +701,10 @@ vectorized: true table: xyz@zyx spans: /7/!NULL-/7.000000000000001 limit: 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (z) STORING (y); query T EXPLAIN (TYPES) SELECT min(x) FROM xyz WHERE (y, z) = (2, 3.0) @@ -718,6 +726,10 @@ vectorized: true table: xyz@zyx spans: /3/2-/3/3 limit: 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y, z); statement ok SET tracing = on,kv,results; SELECT min(x) FROM xyz WHERE (y, z) = (2, 3.0); SET tracing = off @@ -750,6 +762,10 @@ vectorized: true table: xyz@zyx spans: /3/2-/3/3 limit: 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (z, y); # MULTIPLE MIN/MAX @@ -935,22 +951,26 @@ vectorized: true │ spans: (/NULL - ] │ └── • subquery - │ id: @S2 - │ original sql: - │ exec mode: one row - │ - └── • group (scalar) - │ - └── • limit - │ count: 1 - │ - └── • filter - │ filter: y > 0 - │ - └── • scan - missing stats - table: xyz@xy - spans: FULL SCAN + │ id: @S2 + │ original sql: + │ exec mode: one row + │ + └── • group (scalar) + │ + └── • limit + │ count: 1 + │ + └── • filter + │ filter: y > 0 + │ + └── • scan + missing stats + table: xyz@xy + spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y) STORING (z); # Scalar subquery in filter is supported. query T @@ -1191,6 +1211,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); query T EXPLAIN (TYPES) SELECT v, count(*) FROM kv GROUP BY v ORDER BY count(*) @@ -1215,6 +1239,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); query T EXPLAIN (TYPES) SELECT v, count(NULL) FROM kv GROUP BY v ORDER BY count(1) @@ -1249,6 +1277,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); # Check that filters propagate through no-op aggregation. query T @@ -1279,6 +1311,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); # Verify that FILTER works. @@ -1319,6 +1355,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: filter_test@filter_test_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON filter_test (v) STORING (k); query T EXPLAIN (VERBOSE) SELECT count(*) FILTER (WHERE k > 5) FROM filter_test GROUP BY v @@ -1348,6 +1388,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: filter_test@filter_test_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON filter_test (v) STORING (k); # Tests with * inside GROUP BY. query T @@ -1804,6 +1848,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); query T EXPLAIN (VERBOSE) SELECT k FROM kv ORDER BY s @@ -1825,6 +1873,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (s); query T EXPLAIN (VERBOSE) SELECT concat_agg(s) FROM (SELECT s FROM kv ORDER BY k) @@ -1866,6 +1918,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (s); query T EXPLAIN (VERBOSE) SELECT string_agg(s, ',') FROM (SELECT s FROM kv ORDER BY k) @@ -1924,6 +1980,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); +2. type: index creation + SQL command: CREATE INDEX ON xyz (y); # Regression test for #31882: make sure we don't incorrectly advertise an @@ -1950,6 +2012,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: uvw@uvw spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uvw (w) STORING (u, v); query T EXPLAIN (VERBOSE) SELECT string_agg(s, ', ') FROM kv @@ -2019,6 +2085,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: string_agg_test@string_agg_test_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON string_agg_test (company_id) STORING (employee); query T EXPLAIN (VERBOSE) @@ -2058,6 +2128,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: string_agg_test@string_agg_test_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON string_agg_test (company_id) STORING (employee); query T EXPLAIN (VERBOSE) @@ -2097,6 +2171,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: string_agg_test@string_agg_test_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON string_agg_test (company_id) STORING (employee); query T EXPLAIN (VERBOSE) @@ -2136,3 +2214,7 @@ vectorized: true estimated row count: 1,000 (missing stats) table: string_agg_test@string_agg_test_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON string_agg_test (company_id) STORING (employee); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/array b/pkg/sql/opt/exec/execbuilder/testdata/array index 75f4d4fa14fc..e701b94690c1 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/array +++ b/pkg/sql/opt/exec/execbuilder/testdata/array @@ -105,3 +105,7 @@ vectorized: true missing stats table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (x) STORING (y, z); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/delete b/pkg/sql/opt/exec/execbuilder/testdata/delete index 929236c5f32e..470603dc5c62 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/delete +++ b/pkg/sql/opt/exec/execbuilder/testdata/delete @@ -87,6 +87,10 @@ vectorized: true missing stats table: unindexed@unindexed_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON unindexed (v); # Check DELETE with LIMIT clause (MySQL extension) query T @@ -109,6 +113,10 @@ vectorized: true missing stats table: unindexed@unindexed_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON unindexed (v); # Check fast DELETE. query T @@ -288,6 +296,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX xyz@xyz_y_idx; CREATE INDEX ON xyz (y) STORING (z); # With the hint, we use a constrained scan. query T @@ -317,3 +329,7 @@ vectorized: true estimated row count: 990 (missing stats) table: xyz@xyz_y_idx spans: /1-/1000 /2001-/3000 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX xyz@xyz_y_idx; CREATE INDEX ON xyz (y) STORING (z); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/dist_union b/pkg/sql/opt/exec/execbuilder/testdata/dist_union index f0ebb315cec1..0534f01b73b8 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/dist_union +++ b/pkg/sql/opt/exec/execbuilder/testdata/dist_union @@ -93,6 +93,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: abc@abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (a) STORING (b); # Regression test for #32723. query T diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distinct b/pkg/sql/opt/exec/execbuilder/testdata/distinct index 008c0f1b5d26..45d987079939 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distinct +++ b/pkg/sql/opt/exec/execbuilder/testdata/distinct @@ -37,6 +37,10 @@ vectorized: true missing stats table: xyz@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (z) STORING (y); query T EXPLAIN SELECT DISTINCT y, z FROM xyz ORDER BY y @@ -55,6 +59,10 @@ vectorized: true missing stats table: xyz@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y) STORING (z); query T EXPLAIN SELECT DISTINCT y, z FROM xyz ORDER BY y, z @@ -73,6 +81,10 @@ vectorized: true missing stats table: xyz@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y, z); query T EXPLAIN SELECT DISTINCT y + z AS r FROM xyz ORDER BY y + z @@ -108,6 +120,10 @@ vectorized: true missing stats table: xyz@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (z) STORING (y); query T EXPLAIN SELECT DISTINCT y AS w FROM xyz ORDER BY y @@ -125,6 +141,10 @@ vectorized: true missing stats table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y); query T EXPLAIN (VERBOSE) SELECT DISTINCT x FROM xyz @@ -179,6 +199,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y) STORING (z); statement ok CREATE TABLE abcd ( diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distinct_on b/pkg/sql/opt/exec/execbuilder/testdata/distinct_on index 9417894d362b..8271ded4e46b 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distinct_on +++ b/pkg/sql/opt/exec/execbuilder/testdata/distinct_on @@ -104,6 +104,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: abc@abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (b); # 2/3 columns @@ -275,6 +279,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: abc@abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (a, c DESC, b); ################# # With ORDER BY # @@ -302,6 +310,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x); query T EXPLAIN (VERBOSE) SELECT DISTINCT ON (x, z) y, z, x FROM xyz ORDER BY z @@ -325,6 +337,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (z) STORING (x, y); query T EXPLAIN (VERBOSE) SELECT DISTINCT ON (x) y, z, x FROM xyz ORDER BY x ASC, z DESC, y DESC @@ -350,6 +366,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x, z DESC, y DESC); ##################### # With aggregations # @@ -415,6 +435,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y) STORING (x); query T EXPLAIN (VERBOSE) SELECT DISTINCT ON(min(x)) min(x) FROM xyz GROUP BY y HAVING min(x) = 1 @@ -447,6 +471,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y) STORING (x); ######################### # With window functions # @@ -594,6 +622,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x, y) STORING (z); query T EXPLAIN (VERBOSE) SELECT DISTINCT ON (x, y, z) pk1 FROM xyz ORDER BY x @@ -620,6 +652,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y, z); # Regression tests for #34112: distinct on constant column. query T @@ -645,6 +681,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); query T EXPLAIN (VERBOSE) SELECT count(*) FROM (SELECT DISTINCT ON (x) x, y FROM xyz WHERE x = 1 ORDER BY x, y) @@ -677,3 +717,7 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg b/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg index 7a64544b7c77..269e53365d28 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg @@ -61,6 +61,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzsV11v4jgUfd9fYfkprIyC88HXk5lCq0iQdALMdrRCkSEWjURjNglVq6r_fZVAgVDGzsh0nnghvsk9vtfn-FyJN5j-t4JdOHi4H_YcF2h9ZzwZfx_WwHgwHNxMwBwB-rzUaA2BOeergMahFuSrjxc82ccLvomzIvWJvmyfUVw80ywM2fN2uXn6eAbRLv2ZJhGNF6wIXngS0OVSC-avGUv32_6dF4yyXQNRtguL8lFWA7e-NwIhzSi4873pPfj2E8whgjEPmUufWAq7_0IMETQggiZE0III2nCG4DrhC5amPMlT3gqAE77AbgPBKF5vsvz1DMEFTxjsvsEsylYMduGEzlfMZzRkid6ACIYso9GqKJN3QdZJ9ESTV4jgeE3jtAvqOgY0DgEGPHtkCUTQ22RdQDAiBiI2Ik1EWnD2jiDfZIe6aUaXDHbxO6reW2-5TNiSZjzR7XJrJD9-z_0ZuN4kcKfDoUaMWt7jdKQRnK9uvKk72a2_ed4w6Ll9jZj70PN3UZEY-N4_Yy0PR72HHWrkuLvV-Lvfd25vP6LpKHD2ez94ftC7u9OIVWztTLaF7I8or2PXTvg4HHH-Ch5p-nhyOgxn7wfOjF9ydthnE_MkZAkLSzsVuwhYxY1PhU9pxXtajdLhzTKxVolYu5Ta3PPa2vPazle3jtsbBuNJvz_4oZFOcYHMMsWNQ96Pnu_03JtBKXNPP8Yl_rFxLAAucn0Whywprioghk5MBIiFALERIE0ESAsB0kaAdPLPCBDcyH_yZGzsUnCOwdYvr7d5WalcXudrHdsnmedrW6XauLrtcRXb67iuGxczvqS7oyvavBr_DGfKxsdX43-h8Y3q5jMqmc-o6-bFzCfp7uiatK7mO8OZsvmMq_m-0HxmdfOZlcxn1nXrYuaTdHd0TdpX853hTNl85tV8X2g-q7r5rErms-q6fTHzSbo7uiadq_nOcKZsPutqvj_0f_OMED5L1zxOWaV_k41cShYu2Vb3lG-SBbtP-KIosw29Ale8CFmabb_ibeDE2095g8dgfArGx2CjBMa_B26qgDsqYKzUN7bFaEPItykGm2KxmmK1LCHaFoNtFanFYInUYrBEajFYJrUELZG6qSJ1Swhui8Vqq4glBkvEEoMlYonBMrEkaIlYHRWxsGSKysao2hxVG6Rqk1RxlKrNUqw0TLFkmloS0T6N098STYyWiSZGy0QTo6WiSeAy0T4NVaFos_e__g8AAP__dlZT8w== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (b) STORING (_bool, _bytes, _bit); statement ok ALTER TABLE data DROP COLUMN _bool; @@ -504,6 +508,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ll9voloUxd_vp9jZTzYeg-cA_iG5Cfe2NmPS0Y6azEwmPqCctCZWnAMm0zR-9wkSpVI9GwrhEXSdvVj89gpvGP5eo4ODH48P_w1H0LgbTmfTbw83MB08DG5nEF8PR7cz8Bgs4H4y_gq-F3nw_ctgMoBGw4MmLG6gCUvHGY5mvRv4F0QXxpO7wQT-_wkLBh4y3AS-HHkvMkTnF3JkKJChiQwtZGjjnOFWBUsZhoGK__J2EAz9P-i0Ga42210U354zXAZKovOG0SpaS3Rw5i3WciI9XyqjjQx9GXmr9WFM7NPdqtWLp16R4XTrbUIHWgYHb-MDhyB6lgoZjneRAy5nrmCuifM9w2AXpRPDyHuS6PA9y-_qfrWOpJLKsM8tJfcdaDRcDk1wRZyca76PzkkuznxdNSWKmLpbhdFqs4wMngkqmcFwrHyppH95aHrO4hWevfD50hnzferNvOotPSpIJmaPajJXNJPDrj-E_YmHSN1ZRZKbBiqSyhDZ3ESTubx5dYb96QROB18wMwpawdYQ549_zULnzALPv0s8zy4ZvGWICraJ8HXapk6d20SYSkHk9W8Tr3ybOhVuE5HccZuyuRXaJpEfZZELZdEyzApQJnydUO7WiTJhKqVA1I-yqBzlboUoE8kdUc7mVghlMz_KZi6UzZZhVYAy4euEcq9OlAlTKQVm_SiblaPcqxBlIrkjytncCqFs5UfZyoWy1TLsClAmfJ1Q7teJMmEqpcCqH2WrcpT7FaJMJHdEOZvbpz_XL8yYyHAbbEKZ6yu8HUcj_SeZxBkGO7WUjypYHsYkl-OD7nDDl2GU_MqTi-Em-Sk2-F7MtWKhF4usmL8Xm2diXkzcLyPmVil1qdmCmG1qA7f0gVtasa2fbOtfdUc_uqNVd_Xirlbc04t7ZSjTi4k3rRdTlBHqUrMpyvr6TmgTpaCvFIIzru8UTpQK_7Bf53KTkH9YsCK4EGrinRFqChhKXm46hQzXlwu3idz19UIxo68XTvQL1xcMJxqGl6oYQk29tXIlQ8nLTSeZ0feMIHpGlOoZQXy7UB8v-p4RRM-IUj1DqKkvkHI9Q8nLTaeYEfqeEUTPiGI9M9__8zcAAP__pXCBQQ== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (b, a); query T EXPLAIN (DISTSQL) SELECT c, d, sum(a+c::INT) + avg(b+d) FROM data GROUP BY c, d @@ -524,6 +532,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzUlltv2kAQhd_7K1bzBGKR2V2bi5-cpmmFREzKRWpUocjBK4JEbLo2VaOI_17ZkHBxsmOEkeDNGH-e2TlnjvwK0Z8Z2HDz665z1XZJ6Vu7P-j_7JRJ_6Zzcz0gY0p8SqLFc8kjFTK27bY7aJZJhXh_J6VHUiF-mXzvdW-J78Ue-dHrDu_I1_sUAwpB6EvXe5YR2L-BAQUOFARQMIGCBSMKcxWOZRSFKnnkNQXa_j-waxSmwXwRJ7dHFMahkmC_QjyNZxJsGHiPM9mTni-VUQMKvoy96SwtkzTizNX02VMvQKE_94LIJlWDES_wCSNh_CQVUOjJwJfKJg6rOGJ1LkocXnFMShxBiWPCaEkhXMSbNqLYm0iw2ZLmb_VqMlFy4sWhMqzdTh1BnWQQV-79g9sdPLjDTqfkiHLmlpnc6g9vSw57v-LJ1XV36A7S691WN9UfX8iTFz3tFWbU4TBabk7EPz3R5lWLIFS-VNLfeVn6Fs2ZWe2j2vsnZNlD8_ejivert0E8tJNjW-UdGRP13qQzHOtT9cQh6rlhNZwbbE-5bNGKxi5mscNdtcRre09-XNvaqc3ybxXLs1UGqxr8VHuFNLvlsfqF7BUrcq_Yee8Vot56r-rF7RXP722ey9u8aohTeRtpdkvnxoV4mxfpbX7e3kbUW3u7UZy3RX5vi1zeFlXDPJW3kWa3dG5eiLdFkd4W5-1tRL21t5vFedvM720zl7fNqmGdyttIs1s6ty7E22aR3jbP29uIemtvt07zrf9BwZ6M5mEQyVxf8rVk-NKfyJVSUbhQY3mnwnFaZvWzm3LpDV9G8epftvrRDlZ_JQ1uw2wfZtsw34HZYXDjGJixo2jrKLqlp7l24EI_cKGFTX1lUwtzRGtLS9f1cP0Yo-hhxCh6GDMKQiNGQWjEKA3twJv6gTePMUpLnwk1JBQykXJQKuhpLBb0NJoLCI4FA4IjgrNMsOzOnSNz1ycLojnTRwszkeKZcDlIdD2Nia6nUdERHBMdwTHR9bnKkGBlmYw5SHR9xjAkZFgmZQ4SXU9joutpVHQEx0RHcEx0fcJyJGG5_qNtX_TR8sv_AAAA__-I9wkL +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (c, d); query T EXPLAIN (DISTSQL) SELECT c, d, sum(a+c::INT) + avg(b+d) FROM data GROUP BY c, d ORDER BY c, d @@ -548,6 +560,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzUl11r-kgUh-_3UwznSslInEliba7Sbd1FsLHrC2xZpKRmsII17iQuW4rf_U8SrSbBOZEQ0Ltk7JM5c37PHOg3hP-uwIbe3y-Dh75LGk_98WT816BJxr1B73FC5pT4lITbz4ZHNDK37b476TaJRrz_Fo13ohG_Sf4YDZ-J70Ue-XM0nL6Q318TjAxHT73R4Q0orANfuN6nCMH-BxhQ4EDBAAomULBgRmEjg7kIw0DGf_KdAH3_f7DbFJbrzTaKl2cU5oEUYH9DtIxWAmyYeO8rMRKeL6TeBgq-iLzlKtkmLsvZyOWnJ7-AwnjjrUObtHRGvLVPGAmiDyGBwkisfSFt4jDNMdJTUuJwzTEpcQxKHBNmOwrBNjqWEUbeQoDNdrR8qeNARkLqVrZKx9CoY2pnt-CXbPGwWEix8KJA6qyd34c6cbOH0hdS-DY5LDy4r2_ucPLmTgeDhmM0C0tmvDSePjcc9vPE46fH4dSdJM_Z4o_1vH-RDy_8yFXCqMNhtjue0Th7xuOngrTu_Kc06nAt_ZiqGfmmJyWcNmO_kD05KzaD_7TA-Hk6NOitH7fDamacilU6eKQ71tmczVp64AatYKPznAvF6jSF5FamMlb-PrIy91FnLZ3XdSORYvc3slPlRiJbnErIbvVGshpuZL7p134jeXnveSnveUs36vIeKXbv_V0V75EtTqPmt-o9r8H7fNOv3XujvPdGKe-Nlm7W5T1S7N77bhXvkS1OozZu1XujBu_zTb92783y3pulvDdbulWX90ixe-_vq3iPbHEatXmr3ps1eJ9v-rV7j_yHORLhJliHInOqc19ux80R_kKkDQ2DrZyLFxnMk23S12HCJQu-CKP0V5a-9NfpT3GBpzBTwlwN8zzMTmEjA7PL4G4VmPFKdKcKzdtq2lA23FTDpjotJGtLSXfUcEcJ36nhuyqiqGFEFDWMiYLQiChqGhOlW0WUe_VMaCNDARkp2EwpDJVL4kZoJG-ExgLHcCRxBMciZ4XRcknmTD1amImkph4uzELwwnS5KHQ1jYWuptHQERwLXY2joasnKxZ6YchkU-siqamnDLtH8MKcuSh0NY2FrqbR0BEcC12NY6Fz9YTNhz7b_fYrAAD___6ENUA= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (c, d); # There should be no "by hash" routers if there is a single stream. query T @@ -590,6 +606,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzMll1vok4Uxu__n2JyrjQdAzOAL1zhv7VdE6tdtZttdk2DMrEmFtwBk20av_sG2BTF7hyMSrzi9eGcOc9vnvAO4a8l2ND5_tBrd_ukctMdjUdfe1Uy6vQ612MSrl8rbpUmx-nf46xKboeDe-K5kUvuhoPHB_L_E_HIl_a3bv8ulZArMq2Sn2tdNwRhOlDwA0_03VcRgv0DGFDgQMEACiZQsGBCYSWDmQjDQMavvCeCrvcbbJ3Cwl-to_j2hMIskALsd4gW0VKADWN3uhRD4XpCanEhT0TuYpmUiTt0VnLx6so3oDBauX5ok5rGiOt7hJEgehESKAyF7wlpE4ddOZwSh1GSHA1KHBMmGwrBOso6CCN3LsBmG1q8y_Z8LsXcjQKpWbtNOvF1u__03B-Mn_uPvV7Fsapxt4_3FYd_nBkfZ-bHGavmmsvqTd_Iixu-5EoxmGyyBfB_LiD7ztoPpCek8Ha-lHxFsUSm7xXOr5EVXKOVX2PWv3GIAbeLZSSkkBrLzT99YBPHyni1bfumc929b_eAwmAd2TEPjkEVNJinHWY_qAUrjeu5Nz-vbe3UZsX3CyuyXzRW0_gZdgzS5xZO9cvcMeyUO4aVv2MQA7IdUy9hx_Di1PJC1PKaZpyBWqTPLUsbl0ktPyW1vHxqEQMyahslUGsUp9YoRK1R08wzUIv0uWVp8zKpNU5JrVE-tYgBGbXNEqg1i1NrFqLWrGnWGahF-tyytHWZ1JqnpNYsn1rEgIzaVsn_1J80MxThKvBDUeiPWY-HLby5SJ0Jg7WciQcZzJIy6eUg0SU3PBFG6VOWXnT99FHc4LaY5cVsW8x3xOwwceMYMWNHqa2j1C21misHbqgHbijFprqyqRRzxGtLqa6rxfVjQFGLEVDUYgwURI2AgqgRUBrKgTfVA28eA0pLnQk6Egp7kXJQKqjVWCyo1WguIHIsGBA5YjjbC5bduXNk7upkQTxn6mhhJlJ8L1wOMl2txkxXq1HTETlmOiLHTFfnKkOCle1lzEGmqzOGISHD9lLmINPVasx0tRo1HZFjpiNyzHR1wnIkYbn6py1v-mTz358AAAD__75d3tU= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (d); query T EXPLAIN (DISTSQL) SELECT avg(a+b), c FROM data GROUP BY c, d HAVING c = d @@ -611,6 +631,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzMl9tr4zgUxt_3rxDnKaEKjiTnZig42227gdTp5rJMGUJRY5EGUjsjO8OUkv99cFJy81THuYHfbNk_6zv6vnNIPiD6MQUHbr89tpstjxT-afX6vf_aRdK7bd_e9In8OS5IckVeipSMyF2380B8GUty3-0MHsnfT2REiU_-bf7f8u7JiFwTHygEoa88-aYicL4DAwocKAigYAOFCgwpzHQ4UlEU6uSVjyXQ8n-BU6YwCWbzOFkeUhiFWoHzAfEknipwoC9fpqqrpK-0VQYKvorlZLrcJlHlzvTkTep3oNCbySBySMliRAY-YSSMX5WG4YJCOI83O0SxHCtw2IJmV3E3mcZKK21VdiWs1h3iCnJN3KTWrgr85Qq7cjklrqDJ-lci-CEimuOxVmMZh9pie0fhJkfd9J6evU7_2Ru02wVXFJMzGTwUXJZc3XQGXv_zevdFXtyTt9nx5Z28yuh1by8Gw8WmBPFlCZvvzINQ-0orf-dLy6-YiqykNt7XztZF8s-r51ZSpkiXaRe33eEW4ox93rK8sBTOLF7ee_PPe1d29mbZG4RlaRCLlSx-RIsgOtYtUr1kiyAittPDctoi7JwtUs1Ni_DsMeWZYspLljgipoiOdUxrl4wpImLbQZ7TmPJzxrSWm5iK7DEVmWIqSpZ9REwRHeuY1i8ZU0TEtoMipzEV54xpPTcxtbPH1M4UU7tkVY6IKaJjHdPGJWOKiNh20M5pTO1zxrSRm5gi_1i6KpqFQaQy_eotJ2Urf6xWZxSFcz1SjzocLbdZ3XaW3HLBV1G8espWN61g9SgRuA0zI8zNMN-H2TYsdmB2GFw_BWb8JLp6Cs3LZloYD9w2w7bZLcTripGumuGqEa6Z4dopQTHDSFDMMBYUhEaCYqaxoNRPCUrDPBPKyFBARgo2U1JD5RC7ERrxG6ExwzEccRzBMctZarQc4jkzjxZmI66ZhwurIHhquhxkupnGTDfTqOkIjpluxlHTzZMVMz01ZHZdqyOumacMayB4as4cZLqZxkw306jpCI6ZbsYx07l5wu6bPlz89TsAAP__M1zTEw== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (d); query T EXPLAIN (DISTSQL) SELECT sum(a+b), sum(a+b) FILTER (WHERE a < d), sum(a+b) FILTER (WHERE a = c) FROM data GROUP BY d @@ -629,6 +653,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzMll9v2jAUxd_3Kaz7BKpRsB1oG6lSuo1uSBS6QLVVG6pcbFEkGjMnkVZVfPcpQSuBdnYqg8qb8-eXe-49R1d5guT3HALo_LjqnXf7qPa5OxwNv_XqaNjpdT6NUJI91Dg6Qnd1XDqji25v1IlQ7fvXTtRBHP3Kmk02QcL81hma1NFFNLhEgqccfYkG11fo4w0SgCFWQvb5g0wg-AkEMFDAwACDDxhaMMaw0Goik0Tp_JWnAuiKPxA0McziRZbmt8cYJkpLCJ4gnaVzCQGM-N1cRpILqb0mYBAy5bN5USZXES707IHrR8AwXPA4CVDDI4jHAhGk0nupAUMkYyF1gEJyFFKMQrJqN_Tz81nIMAp9GC8xqCxdC0lSPpUQkCWuLvZ8OtVyylOlvdam1jCfw3n_5rY_GN32r3u9WujXc9HXl7WQlE7_ph7SV-6xLZnryneP6J4n91tFCYyX61bof1tZfyeLlRZSS7HxpeIrhmZJ80Xh7W7XPdLnE3s-FbMYZGmAQopDhg2GsN120VcNtfBIa-vN12v7G7VJ9eSSKsn1SMOj-8uuRW7JzvahZ5fsMrvkvbJLq-eHVsoPbXhsf_mxyC2N9PjQ80N3mR_6Xvlh1fPDKuWHNTx_f_mxyC2N9OTQ88N2mR_2Xvnxq-fHr5Qfv-G19pcfi9zSSE8PPT_-LvPjH8K_1ysaI5ksVJzISn9WzbxLKaZyNZJEZXoir7SaFGVWl4OCK24ImaSrp2R10Y1Xj3KBZZhsw6QM0w2YvA1uu8CnLjBx0k1aZpoa583MMDOb1Ta75RvplhluuVhthi1Wm2GL1WbYZrWFtljddrH62AifmM06cTHLDFvMMsMWs8ywzSwLbTHr1MUsYtmitjXqtkfdFqnbJnVcpW67lDgtU2LZpr7FtBfr9E2mmWmbaWbaZpqZtppmwW2mvViqRtPGyw9_AwAA__9_QsYt +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (d); # Same query but restricted to a single range; no local aggregation stage. query T @@ -739,6 +767,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlWFr2kAYx9_vUxzPq4Sdi5fE1h4MktW0C1jtorCVIeXqPWSCzbnLCSvF7z5irJ0yk6BvfNfnrn__P39PiK-Q_54Dh-jHfT-MB8TqxaPx6FvfJqOoH12PidBavDyKNLWETW6S4R2x3m7KUQojyPevURIRy3oinwmzSTjoEWta_P2pbW9GuRnJMOlFCfnyQIQNFDIlcSCeMQf-ExhQcIGCBxR8oNCBCYWFVlPMc6WLf3ldB2L5B3ibwixbLE1xPKEwVRqBv4KZmTkCh7F4mmOCQqJ22kBBohGz-bqmQA4WevYs9AtQGC1ElnPSchgRmSSMKPMLNUxWFNTSvDfkRqQInK1oc4qb2dygRu10dhHKc04sK3ALMZzzeDDublwFXimLc37TH4bj7pvEwN9e9KLr-C7sFw6HS8NJwA4SuweJ30GVlqhR7lIG7CNMVv_5WmGaakyFUdphe3LDJAkfHsPbWytg9kEkbweJNV8la7JKh7Uc94hl1nBsl3lxNst0m5tzG5lzW453hLkajq25y7Mx5zU35zUy57Uc_whzNRxbc92zMec3N-c3Mue3nM4R5mo4tuauzsZczY9FgvlCZTnu8B765HbxXkaZYvkez9VST_Feq-m6phyH69z6QGJuyltWDnFWXhWA_4ZZZdjdCbP9sFvdXFPtVab96rB_CnenMnxR3XxxSvNlZbhb3dw9pfmqelftmsek-iHb756sPvwNAAD__yC-ODo= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (b, c, d); query T EXPLAIN (DISTSQL) SELECT json_agg(a) FROM (SELECT a FROM data WHERE b = 1 AND c = 1.0 AND d = 1.0 ORDER BY a) @@ -757,6 +789,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlVGPmkwUhu-_XzE5V5BvLA6g607SBLrilsaVLZq0TWM2s3JCbVzGDmPSxvjfG8S61VQgeuPdnpl9fR-fQ3AN-Y8FcAg-Pw79cESMfjiejD8OTTIOhsHdhHzPZfYk0tQQJhnE0QMxdheiHBOhBfn0PogDYhjP5C1hJvFHfWLMir_ftM3dmOxGEsX9ICbvvhBhAoVMJjgSL5gD_woMKNhAwQEKLlDowJTCUskZ5rlUxb-st4Ew-Qm8TWGeLVe6OJ5SmEmFwNeg53qBwGEinhcYo0hQWW2gkKAW88W2pkD2lmr-ItQvoDBeiiznpGUxIrKEMCL1N1Qw3VCQK_3akGuRInC2oc0pBvOFRoXK6hwilOecGIZnF2I45-Fo0tu58pxSFud8MIz8Se-PRM_dX_SDu_DBHxYOo5XmxGMnie2TxK-gUiWoMDmk9Nj_MN3842v5aaowFVoqix3J_TCORk_-_b3hMfMkkXNAxJpvkjXZpMValn3GLms49rvsXs0u7ebm7Ebm7JblnGGuhmNv7uZqzDnNzTmNzDktyz3DXA3H3lzvasy5zc25jcy5Latzhrkajr2526sxV_NbEWO-lFmOB7ynPrldvJYxSbF8jedypWb4qORsW1OO0Ta3PUgw1-UtK4cwK68KwL_DrDJsH4TZcdiubq6pdirTbnXYvYS7UxnuVjd3L2m-qQz3qpt7lzTfVu-qXfOYVD9kx93TzX-_AwAA__8sJTeQ +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (b, c, d); # Test that orderings on GROUP BY columns are propagated through aggregations. statement ok @@ -873,6 +909,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUktFq2zAUhu_3FOK_SkAlsd3d6MrZlo0M186SFFqGCYp1ZgyO5UkydAS_-7A9tqZgr73Ukb7zf4ejC-zPEgLrh2202sRs9mmzP-y_RXO2X0frjwd24uwsn2bZnH3eJXfMauNIHZV0MvyhNfuyS-637MMjO4Gj0opieSYL8R0eON4j5aiNzshabbrypX-0UU8QS46iqhvXlVOOTBuCuMAVriQIxPpG14sAHIqcLMr-WcuhG_cPsk7mBHHb8meNvenGB3kqaUdSkVksr9rjxXTg2NeysoLdgCNpnGChhzEJ7y0SX3VR_XHwxh1qU5yl-fU33OdhMJrvvyV_leeGcum0WfjX-WHnkxhFhlQ_L8cqfjzGyeEY30fRLPTm4LhbPcxCfz4qE1zJ_GfVO7K1riy9atfLNuUgldPwnaxuTEZbo7M-ZjgmPdcXFFk33N4Oh001XHWCz2FvEvanYX8SDqbhYBJevoDT9t3vAAAA__-IXTK3 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX sorted_data@foo; CREATE INDEX ON sorted_data (b) STORING (c); query T EXPLAIN (DISTSQL) SELECT * FROM (SELECT a, max(c) FROM sorted_data GROUP BY a) JOIN (SELECT b, min(c) FROM sorted_data@foo GROUP BY b) ON a = b diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on b/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on index 0e2f1203ffe9..3a756a44f6e3 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on @@ -120,6 +120,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y, z); query T EXPLAIN (DISTSQL) SELECT DISTINCT ON (x,y,z) x, y, z FROM xyz ORDER BY x @@ -139,6 +143,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8lkFv2kAQhe_9Fas5Jeois2sDiU-0CZWQUkiBQ6uKg4NXCRLx0l0jQSL-e4UJEDDMLBhxwzZvZ_zepye_g_03ghAavx8fvjVb7Oq-2e11fz1cs27joXHXY4vrZuuux9otdjXlbMbZ2zX7-MF-dNo_2XT2xtqd-0aHff_DpsAh0bFqRa_KQvgXBHCQwMEHDgFwqECfw9jogbJWm8Vf3jNBM55CWOYwTMaTdHG7z2GgjYLwHdJhOlIQQi96GqmOimJlvDJwiFUaDUfZmOnsrT42w9fIzIBDdxwlNmQlbzG5PUlDVpe87vN6AP05Bz1JN0NsGj0rCMWcuy9yP7TpMBmkXmV7i7rg2aCdKRvh04y9RPbloGqzjzy4z-a0SaJNrIyKt87LTjm4sSg7rbxZxD_GmK42qTKeyPny9eD5gcOL7nvNj0P3LNHSJT32ZHnHlf3jK1vjhTuAwgFAT5a84EQEiVXWgVYvhKA4H4KiEIKEMSsEc764IijdGZAuDASlLKNTGCBWWTtauxAD8nwMyEIMEMasGMj54sqA786A78JAtZRldAoDxCprR28uxIB_Pgb8QgwQxqwYyPniykDgzkDgwkCtdCIBxCJrP28vREBwPgKCQgQQxqwIyPlyysfInvM7yo51YpXTd0Z5YYSKn9XSNasnZqAejR5kY5aX7UyX3YiVTZdPxfKimSwfLRb8LBa7YvFZLLfE4jhxrYhYiELqSiH1La6WqOE-briPigN8coCKJZF1BVVXcXG1CCi4mAAFF1OgEGoCFEJNgFJDDb_BDb8pAsot3gllohRylXJUK-BqqhZwNdkLhJwqBkJOBC5yxbLtuyR8x5uFyFzg1SICYniuXI4KHVdToeNqMnRCToVOyKnQ8V4VRLGKXMccFTreMYIoGZFrmaNCx9VU6LiaDJ2QU6ETcip0vGEl0bAS_2jbDb0___I_AAD__8DB-Cg= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y, z); # Ensure that even with more ordering columns, ordering propagates past local # DISTINCT processors. @@ -166,6 +174,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y, x); query T EXPLAIN (DISTSQL) SELECT DISTINCT ON (y) x, y FROM xyz ORDER BY y, x @@ -186,6 +198,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ll9r4kwUxu_fTzGcq5aOxJnEP82V77YuCF3tqhe7LF6kZmgF67gzEUzF774kCqmmnpMY8TK1P5-T8_w4uAH7dw4-dH89P_3f67Obx95oPPr5dMtG3afuw5glz73-w5gN-uwmvmVrzmL2fTj4wdbxBxsMH7tD9u03izlbA4eFDlU_eFcW_D8ggIMEDi5w8IBDAyYclkZPlbXaJP-ySYFeuAa_zmG2WK6i5M8TDlNtFPgbiGbRXIEP4-BlroYqCJVx6sAhVFEwm6cx6_ijszSz98DEwGG0DBbWZzUnSR6sIp91JO-4MNly0KsoS7BR8KrAF1tefIqRNpEyTuNwgI684x1xdzJClol4nNlotphGjqgfpyQvZEJlVJi81FFc9g0vMXsL7FuOnmyzkdyTI2Xfo3dZp94VnT23IXT2bC6vwlxfz9TXNb105OEyT8U3DuJFcSVFASUdWXO8c6Qk5thL2awiJRGRFSuuJqW4uJS5DZ0lpSxuhSxihVdLqyttBTHH3opWFSuIiGyz8mpWyItbkdvQWVa4xa1wi1jRrKXVlbaCmGNvRbuKFUREtln3ala4F7cit6GzrPCKW-EVsaJVO8cJYoq9E_dVnCAisr16V3PCu7gTuQ1V_lHzRdxQ2aVeWFXo90o9GViFr2r3klavzFQ9Gz1NY3aPg5RL_xAqG-0-FbuH3mL3UTLgZ1igsMRheQyLz7B7AItycLsKLGQlulmFlnWcdtGFezjs4W0RXTdQuonDTRRu4XCriig4TIiCw5QoBE2IgtOUKO0qotzjN6FOHAXipFA3JXdUytRN0ETfBE0VTuFE4wROVS5yp6VM5wI_LcIjWsOPi2gQeO66lCodp6nScZosncCp0nGcLB2_rFTpuSNz2FqbaA2_MuKewHN3plTpOE2VjtNk6QROlY7jVOkSv7DHpU-2__0LAAD__xPOEOI= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y, x); # Distinct processors elided becaue of strong key. query T diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin b/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin index fa411e6fbd5a..49d8be5656dd 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin @@ -37,6 +37,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUUE9L-0AQvf8-xTCn9sdKNxVB9tRiUwzUtCYBBc1hTYYSSLNxdyNKyHeXZK21QkWP8968P7wWzXOJAv37zWoehDBaBHES367GEPsr_yqB_7CM1jdg4e7aj3wYvcBjw_k5gcfHMA8Xn0gGF3yMDCuVUyh3ZFA8oIcpw1qrjIxRuofa4SHIX1FwhkVVN7aHU4aZ0oSiRVvYklBgIp9KikjmpCccGeZkZVEOtnZW62In9RsyjGtZGQFnmHYMVWMPhsbKLaHwOvb70GVRWtKkJ95xosMFjGbTwwBCiCBMLj922DP9EHvmZKnpX0pFZGpVGTqqdMqZdylDyrfk1jaq0RlttMqGGHeuB90A5GSsYz13BJWj-oJfxd6P4uk3cdr9ew8AAP__FVC8zg== +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t@v; CREATE INDEX ON t (v) STORING (w); query T EXPLAIN (DISTSQL) SELECT * FROM t WHERE v > 10 AND v < 50 ORDER BY v @@ -56,6 +60,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkUFLw0AQhe_-imFOra40SRFkT602xUBNaxJQ0RzWZCiBNBt3N0Up-e-SxFortNjjvLfvm8fsBvV7jhzdp8Vs7PnQm3hhFD7M-hC6M_c2gnOYBvN7MPB45wYu9NbwWlnWkMC2-jD2Jz9KAldWH-bBxA3g5hnWyLCQKfliRRr5C9oYMyyVTEhrqRpp0z7w0g_kFsOsKCvTyDHDRCpCvkGTmZyQYyTecgpIpKQGFjJMyYgsb7FmVKpsJdQnMgxLUWgOlxjXDGVldkBtxJKQ2zX7_9JplhtSpAb2_sZO59AbObtbcM49P7r-PsnWaW6ydQ6Wck4pFUplSA2c_Uoj5-IgfngKPiBdykLTHv4Q2apjhpQuqftMLSuV0ELJpF3TjfM21wopadO5djd4RWc1BX-H7aNh53jYORoe_gnH9dlXAAAA__8M7_K8 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t@v; CREATE INDEX ON t (v) STORING (w); # Here we care about ordering by v, but v is not otherwise used. query T @@ -76,6 +84,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUUV1ro0AUfd9fcblPCTtLHGVhmSezG8MKWc2qsFtaH6xegmAcOzOmLcH_XtSmaQoJzeM9Z84HZ_aoHyoU6P1fr-Z-AJOFHyfx39UUYm_l_UrgEZZR-AcM_PvtRR5MdnDXWpZDwK0pzIPFG5LDd2sKYbTwIvh5AztkWMuCgmxLGsUtckwZNkrmpLVUPbQfHvjFEwqLYVk3renhlGEuFaHYoylNRSgwye4riigrSM0sZFiQycpqsDVuo8ptpp6RYdxktRbwDRmGrRHg2sx1MO0YytYc3bXJNoSCd-zzDZZlZUiRmvHT-BEXMHH5cRghhB8kP173OTD9QAfmbCn7mlKxVIbUzD6t5PKvxwHOBjnXBEWkG1lrOgk652x1KUMqNjT-sZatymmtZD7EjGc46AagIG1Glo-HX49UX_C9mF8U25fF9kWx80Gcdl9eAgAA__92zfiN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t@v; CREATE INDEX ON t (v) STORING (w); # The single join reader should be on node 5, and doesn't need to output v. query T @@ -93,3 +105,7 @@ vectorized: true spans: [/41 - /49] · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkVGPmkAQx9_7KSbzpMkaFtCXfdJWmtJYsGDSNi0PFCaGBFm6u9i7GL77Bbh4aiJ39zj_md_8YPaE-l-JAr2f283KD2Cy9uNd_H0zhdjbeJ928B8-R-E3MPDjixd5MDnCn4Zzl2DOp7AK1uckgwWfQhitvQg-_oIjMqxkTkF6II3iN9rIcIEJw1rJjLSWqotP_ZCfP6DgDIuqbkwXJwwzqQjFCU1hSkKBgZzJ2nKQYU4mLcp-rGUoG_MCaZPuCYXbsovF9vjiXfq3pIjSnJTFr9ajWXa_EddppQVYc3tmLbqJsDECljbe09vv0X-VRfVst2_ttSoOqXo8K927SudK-copI9K1rDS96Za8TRhSvqfhubRsVEZbJbNeM5Rhz_VBTtoMXXco_GpodR94CdujsDMOO6Mwv4GT9sNTAAAA__82C-wq +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t@v; CREATE INDEX ON t (v) STORING (w); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join index 2a045f53e489..768e764e395a 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join @@ -479,6 +479,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: parent1@parent1_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON parent1 (pa1); query T EXPLAIN (DISTSQL) @@ -509,6 +513,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzEldGvokYUxt_7V0zOk3THDDMDXCS5CZuu27q5q1u1aZPWB1amSuICHTDpzY3_ewPoVbk4I6XaFyJwfvON33cO8wLZXxvwYPjbl6f3ozHqfRjN5rOfnww0Gz4Nf5ij79HH6eQzSgMp4pyiT5PRGK1kEIfLdbQJGfplNhr_iHppFFID_frTcDpEvV6vvEd_bE2Ti0dEqYHejz-gk6fLR0S5YaDJFNWLB03FjBqN1bxxac4P1WlwqEWmARjiJBTj4JvIwPsdKGBggIEDBgsw2LDAkMpkKbIskUXJSwmMwr_BMzFEcbrNi8cLDMtECvBeII_yjQAP5sHXjZiKIBSSmIAhFHkQbUqZE7v8VEbfAvkMGGZpEGce6hNGLEYYYSiIQ0RRkq-FhMUOQ7LN93pHma_PaB1k63MBn8Jit8CQ5cFKgEd3-N_t2z5fdp95w55r2ztKszbSH6NNLqSQxDnXrZ57ZR_5p13ked5oPHf3ifunrXR4te-RU2xwEWOvKzZw_LIc5zXOZ69NdnjTKUF-0cbjOokMhRRhfZ13hfCxahs31ZVa9Tg-C7kSn5IoFpI8nC-7EX_mPZ--Mx5ltFpXPwHDZJt7yHew_4B9hn2OfQv79sXmsK74Vy32O076SUooq1U2a9tn2vT6meAtZplQk9hmcaVmn1CL2FZxpdaNRpvevzGoefvOYNenQ9ukc_jQ9olDLIc4xLlRLuz-ubi3j4VfH4vVamiOc9In1CW2W1ype6Nw-P8wNPT26VjXp8PapHMYlf7px62MhlXRZP9hNtb9sxnc96Rr2M1UZGkSZ-Kqc8ws_o8IV6KyKEu2cim-yGRZylS3k5Irj4dQZHn1llc3o7h6VWzwetjtAlPWhXY6SZtqmtZp85Q-37dZh1kLv1k72O0C1_xuSTudpE01zZV-W-qwLCVMuTotu8t0qGHNdKhh3XSoac10aKQ10-F0Seuhi99qWOO3Gtb5raY1fmukNX67XfwedPFbDWv8VsM6v9W0xm-NtO7r_-bwaGM4fXN4tHFcQ2ss19A6zzW4xnSduM71N0eI0vXF7rt_AgAA__-KXZo1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON parent1 (pa1); query T EXPLAIN (VERBOSE) @@ -551,6 +559,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: parent1@parent1_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON parent1 (pa1); query T EXPLAIN (DISTSQL) @@ -581,6 +593,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzEldGvokYUxt_7V0zOk3THDDMDXCS5CZuu27q5q1u1aZPWB1amSuICHTDpzY3_ewPoVbk4I6XaFyJwfvON33cO8wLZXxvwYPjbl6f3ozHqfRjN5rOfnww0Gz4Nf5ij79HH6eQzWskgDpfraBMy9GkyGqM0kCLOKfplNhr_iHppFFID_frTcDpEvV6vvEd_bE2Ti0dEqYHejz-gk6fLR0S5YaDJFNWLB03FjBqN1bxxac4P1WlwqEWmARjiJBTj4JvIwPsdKGBggIEDBgsw2LDAkMpkKbIskUXJSwmMwr_BMzFEcbrNi8cLDMtECvBeII_yjQAP5sHXjZiKIBSSmIAhFHkQbUqZE-_8VEbfAvkMGGZpEGce6hNGLEYYYSiIQ0RRkq-FhMUOQ7LN93pHma_PaB1k63MBn8Jit8CQ5cFKgEd3-N_t2z5fdh9xw55r2ztKszbSH6NNLqSQxDnXrZ57ZR_5p13ked5oPHf3ifunrXR4te-RU2xwEWOvKzZw_LIc5zXOZ69NdnjTKUF-0cbjOokMhRRhfZ13hfCxahs31ZVa9Tg-C7kSn5IoFpI8nC-7EX_mPZ--Mx5ltFpXPwHDZJt7yKfYZ9jn2Lewb2P_4WJzWFf8qxb7HSf9JCWU1Sqbte0zbXr9TPAWs0yoSWyzuFKzT6hFbKu4UutGo03v3xjUvH1nsOvToW3SOXxo-8QhlkMc4twoF3b_XNzbx8Kvj8VqNTTHOekT6hLbLa7UvVE4_H8YGnr7dKzr02Ft0jmMSv_041ZGw6posv8wG-v-2Qzue9I17GYqsjSJM3HVOWYW_0eEK1FZlCVbuRRfZLIsZarbScmVx0Mosrx6y6ubUVy9KjZ4Pex2gSnrQjudpE01Teu0eUqf79usw6yF36wd7HaBa363pJ1O0qaa5kq_LXVYlhKmXJ2W3WU61LBmOtSwbjrUtGY6NNKa6XC6pPXQxW81rPFbDev8VtMavzXSGr_dLn4PuvithjV-q2Gd32pa47dGWvf1f3N4tDGcvjk82jiuoTWWa2id5xpcY7pOXOf6myNE6fpi990_AQAA__9NRpoc +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON parent1 (pa1); query T EXPLAIN SELECT * FROM grandchild2 JOIN parent1 USING(pid1) WHERE @@ -608,6 +624,10 @@ vectorized: true missing stats table: parent1@parent1_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON parent1 (pa1); # Join on multiple "interleaved" columns with an overarching ancestor (parent1). # Note there are 5 nodes because the filter cid2 >= 12 AND cid2 <= 14 @@ -644,6 +664,12 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzsll1vo0YUhu_7K0bnKjTjDjMM2EaKxKrrbb1K8NaJ1EqtL1gztZG84AKWuory3yuMsfnwckyokr3IDYqZeeZ8vO-c8AjJPxuwYfLHp9t3U5dcvZ_eP9z_dquR-8nt5OcH8iP5MJ_dkeU62PiCTF13Mid3k_kvE_JxNnXJKvZC_7A4c8nVVf73T9vA5-SmvLx_pZF37ntSbFoGvqhtyl5pjV1Gc5ehkd9_ncwn5Koa86-drhvqhpjVQ05ryxsy1DQym5-S3edRgFycSbIgudQKdlWh5PhArSr7Ta5pQCGMfOV6X1QC9p_AgYIACgZQkEDBhAWFbRwtVZJEcbblcQ9M_X_B1ikE4XaXZq8XFJZRrMB-hDRINwpsePA-b9Rceb6KmQ4UfJV6wWYfJk_f2cbBFy_-ChTut16Y2GQAiycK0S49nHo67PNXsvaSdfUYh1NHUMeAxdOCQpJ6KwU2f6LPy5FXDy9peiZRJpgUTDBBvNAnnETpWsW17E85iS45fQg2qYpVzKxqQvl7OzOVU_KSbdtT92F0kNgpOalYOZjCKfuoRpVddMQKTpacVONkyU1H7n8Q0fhmw06n7cIo9lWs_Mp5i4wstpzbAA6_po64po5xncesC3Cn4pX6GAVhZoqaKzbq7_SqdIJ2EwerdfUVUJjtUpsUlVFHUsekjkWdIXVG1Bl_0yiyR91nKnGjQbRl3Kp36GxssxKbX35xZIeLw7jOTD17cn3AuGSmzJ5cPuMeISke79H47R41G_bS90i-4j0Sl3tZdPFy8T9gwCwmLWYx6xkuRpI7unj45uJmw17axeIVXWxc7mKz00Q-DeEB4yNmjrInHz3Dy0iKRy9z_c3MzY69tJnNVzSzvNzMRhczF4N4UP7Q2DtZ5E5OLrQykuDRyqM3Jzcb9tJONr6Tj_Qzec5Vso3CRF30Ca5nlSp_pfImJtEuXqpPcbTch8l_zvbc_mPOV0marxr5j2mYL2UJXg5zvRdt9aGHvUIjZfM6rZdpUYH1Oiw6NFx0g2sN70pbfehhr9BI2UZrw2W7WrIV5sN2ucxW2mqHrT5at8OY1giNaN1OI1ojoZGyh320HrXC43a1xn3UaocxtRAaUaudRtRCQiNl88Yk7SIXb5-kHBmlvNcsRWhMMgxHNENwRDQsOFZ6r4HKkYlqIqo1Rmon1dppVDUEx1RrxzHVkOBY6Y3B2qra4umH_wIAAP__jH5T_g== +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON grandchild2 (gcid2) STORING (gca2); +2. type: index creation + SQL command: CREATE INDEX ON grandchild2 (cid2) STORING (gca2); query T EXPLAIN @@ -675,6 +701,12 @@ vectorized: true missing stats table: grandchild2@grandchild2_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON grandchild2 (gcid2) STORING (gca2); +2. type: index creation + SQL command: CREATE INDEX ON grandchild2 (cid2) STORING (gca2); # Aggregation over parent and child keys. query T @@ -1066,6 +1098,12 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyckUFr2zAUx-_7FOKdkqERy94ugoDGljGHzM7iHAbDB9V6TQyO5EoytAR_92K7kDokLelRT_q93_s_HcE9VMBh8W-9-h4nZPIzzrbZ39WUZIvV4seWfCa_NukfUkuL2jOyTOOEFPuyUoykCaklI3NSSAYUtFGYyAM64P-BQU6htqZA54ztSsf-QawegQcUSl03vivnFApjEfgRfOkrBA5beVfhBqVCOwuAgkIvy6pv-zKGqG15kPYJKGS11I6TL5C3FEzjT22dlzsEzlr6MTUbq4fQt5jDq-aTsNHGKrSoRrK8I997cmH839Ltl6bUaGfhePoK7_1EhNO5LXd7PxHRFCikjedEMCpCKiIqvlLx7WqY6JY1btDVRjs8D3Wxc9AlQbXDYTPONLbAtTVFrxmOac_1BYXOD7fhcIh1f9X_82uY3QCH53D4JhyN4KDN20_PAQAA__-cfREn +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON child1 (ca1); +2. type: index creation + SQL command: CREATE INDEX ON parent1 (pa1); query T EXPLAIN (DISTSQL) SELECT * FROM child2 JOIN grandchild2 USING(pid1, cid2) @@ -1109,6 +1147,12 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzElV9r2zAUxd_3KcR9aoeCLNnOH8PAY-u2lC7pmg4Gww9upCWG1PIkB1ZKvvuw3ZImzaR4Wr0Xg2z_ro7OkXTvQf9cQQRn3y4v3o4n6OT9eHY9-3JximZnF2fvrtFr9OFq-hnNl9mKM3Q-HU_QQqU5f3jxdTaefEQnRcYpRvOM-6eAIZdcTNJboSH6DhQwMMDgA4YAMISQYCiUnAutpap-ua-BMf8FkYchy4t1Wb1OMMylEhDdQ5mVKwERXKc3K3ElUi4U8QADF2WareppGj1xobLbVN0BhlmR5jpCPUg2GOS6fKi6LXZzh5apXu6WiSmOfUg2CQZdpgsBEd3gvxNIdys_ce2ASsJIwAgjDKU5RxTJcimUq3T2R-nbUutcKi6U4DvFkoq0_XJg_Z9SvTyXWS4U6e-qW4kf5Ukt8fSNyhbLxwFgmK7LCNUjHDMcBzju43iI49He-rcL8x0WdkD1RPZkQSjdt-Dg3MHO3PT4_RC02A-EeiT0qif1eoQGJAyqJw1ebnvQbrfHqLPtwY6PiLWJ6PHE9kifBH3SJ_2XC4d1G86gs3D848MJW52f7ZHpETok4bB60uHLReR3GxH1OssoOD4jv01Gj8em9_S2qwNiTUD63yYUdJvQ8L80wAOaroQuZK7FUe3Nq1Yl-EI0Lmm5VnNxqeS8nqYZTmuubhlc6LL5yprBOG8-VQKPhwcuMKUudOgCj8wwbeEYawcPXOA9x1rSoQs8MsNsH_aewr7Zbt8I012_vX06cAnLDFvCMsO2sMy0JSwzbAkrdAmr72K3GbbYbYZtdptpi91m2GL3wMXuoYvdZthitxm22W2mLXabYYvdIxe7aZtm-fwKbdMt29LWy79Nv2xLWzynz5qH0fRk8-p3AAAA__8tKxoO +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON child2 (pid1, cid3) STORING (ca2); +2. type: index creation + SQL command: CREATE INDEX ON grandchild2 (pid1, cid3) STORING (gca2); # Multi-table staggered join uses merge joiner on the bottom join # and a lookup join on the higher join. diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables b/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables index a980504049ba..cb5555394b19 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables @@ -84,6 +84,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0lWGL2jAYx9_vU4QHBne7SJu09TQwcNv1mOD0VoVtDF90NhyCNl0SYSJ-99FWvVM0yXS-s63_5_nlxx-yAvV7Bgzi70-9D90-unnoDkfDr71bNIx78acRijCi6A4tMXqHHpPBF5Qv5looLdG3z3ESo5sleouI7_u36D3y0SB5iBP08QdSWgKGXGS8n865AvYTCGCggCEADCFgiGCMoZBiwpUSsvzLqgp0sz_AfAzTvFjo8vUYw0RIDmwFeqpnHBiM0l8znvA049LzAUPGdTqdVWu2gJ1CTuepXAKGYZHmiqGGR33fh_Eag1jol-FKp88cGFljd4DH6UxzyaUX7W-v3zN00yEbMYyxbn_Uqvxsfp9EoP-CMBRSc-mRg_N36N3J-cHJ-S9jhcy45NmxoUcg-qIhCo8cWEh4npUWos2BMeqQO_rqAaMOPUkZ7lES9yYQ1yZURWh4oXsdLBS7OjSvVwcLwrYO5Nw6UHfR1Fl0WIluuou2UOxE319PtAVhK5qeKzpwFx04i25Wolvuoi0UO9Gt64m2IGxFB-eKDt1Fh86iS8UNR8cWgJ3j9vUcWxC2jsP_cYkcmZ9wVYhc8b3xpyb75Q3Ds2de30hKLOSEP0kxqdbUj4MqV73IuNL1V1I_dPP6Uwn4OkyMYWoOU2M42AuTw3Bgxm6aV4fGdGQOR8awZXPzkkPfG8Mt8-aWMdw2h9uXYBNLx2wlM7eMWGpGLuoZsRQttCw3N41YqkbMXTtkH6_f_A0AAP__W-z62Q== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON numtostr (str); # Query with a restricted span + filter. query T @@ -144,6 +148,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ld-K2kAUh-_7FMO52oVZzCRR18BCSmupi9WtelEouciaqQY0k52ZgCK-e0my4KrpTNJRL_Pnm3PO94M5OxBvK_Cg_-tl-HkwQndfB9PZ9OfwHk37w_6XGdpgJCRH3ybjHyjJ1pKJtyzkFD2PB6P3F5Kj8Qht0RPalB8jwJCwiI7CNRXg_QYCGGzA4AAGFzC0IcCQcjanQjCe_7IrgEG0Ac_CECdpJvPXAYY54xS8HchYrih4MAtfV3RCw4jylgUYIirDeFWU-dCfn_J4HfItYJimYSI89ADBHgPL5PvRhxNft2gZiuXxWb4NwT7AIGS4oOCRPf6_FklVi5JX9NeyLctq2CQ5atL-Z5OHc7KE8YiWGR1OCnJS90vFpN9DsXxmcUJ5q3Pc2or-kXe-ff_E48VS3vnkHjCMM-khn2DfPZnzMINjMENFgyP2wNIWIafTVtZ2j2qT-iHbdUMuMn5ouZdNmtw26e41krbr23Zq23YL253L2rZva_vxGrad-rbd2rY7he3Hy9p2bmu7dw3bbn3b7dq2c89Nd5pKtHtb0cS69r6oqD-hImWJoLW2gZVPQKMFLY0IlvE5feFsXpQpH8cFV9zAERWy_GqXD4Ok_JQ3WB9um8BdE7hnAhOipkkDY3YzuG0Cd03gngl8YuyMtk9p6yPtqHU7Spgc-7ZOadckLDWsCUsNa8JSw5qw1LAurLZJWB0T3WpYo1sNa3SrYY1uNazT3TXR_WiiWw1rdKthjW41rNGthnW6eya6SZNleX6HNtmWTWnd5d9kXzaldc7J2fZQSg_2n_4GAAD__8eN5D4= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON numtosquare (xsquared); query T EXPLAIN (VERBOSE) SELECT x, str FROM NumToSquare JOIN NumToStr ON x = y WHERE x % 2 = 0 @@ -417,3 +425,7 @@ vectorized: true spans: [/11 - ] · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkU2L1EAQhu_-iqJOM9qSdObWpx13IwazyZpEVtEgbVKEQKY72x8wMuS_SxLBHWEG99hv1VPPC31C-zSgwPjLQ7pPMtjcJWVVfkq3UMZpfFtBo71ym9dbeF_k97D5k3LYl6AVranyB6ftk5eG4PFDXMRwhO8-DHcEPIS8uIsLePcVjutKC2lyn1TAwy0yVLqlTB7IoviGHGuGo9ENWavNHJ2WhaQ9oggZ9mr0bo5rho02hOKErncDocBK_hyoINmSCUJk2JKT_bCcfdbvZjT9QZpfyLAcpbICAs7fYj0x1N79vW6d7AgFn9j_Nyi1cWQCfi6_id4gw0qPHwXwuVjunYBMK7pojV5i3XedoU46bYLo3Hybf86qH0X-WG62F127l7gKsqNWls48ly6HU82Q2o7Wf7Tam4YejG4WzfrMF24JWrJunfL1kah1NBd8DvOrcHQdjq7Cu3_genr1OwAA__-JxwGY +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON numtosquare (xsquared); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_single_flow b/pkg/sql/opt/exec/execbuilder/testdata/distsql_single_flow index e3e6660406b9..6ee193d1811c 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_single_flow +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_single_flow @@ -45,6 +45,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykkt9r2zAQx9_3V4h7Ssa1seRsD4KCyuZRjyzp7MAGIw-qdUsNruVJMmyE_O_D9qC1WdL9eJPu7nPf7x13AP-tAgnJ59vVdbpms7dpvs0_ruYsT1bJmy17yd5lmw8ssOucBY6_HoJ9ukmyhAV-qdkVC-LyDhBqa2itH8iD_AIcEATsEBpnC_Leui586ItS8x1khFDWTRu68A6hsI5AHiCUoSKQsLYXtlnEgGAo6LLqy44Itg2PkA96TyCXR3zSmJ9vvNV3FWWkDblFNGoPQTWufNDuByDkja69ZBdwSpT_qyj_D1FxUvRRq62tM-TITHf3fMlvnN9of__eljW5hRgbr-hrmCk-v3Ll_j7MlJgDwqYNkimOSqCKUS1RvUL1-uQ88WieZ04iI9_Y2tMf3UTUDUNmT8NyvG1dQbfOFr3M8N30XB8w5MOQXQ6ftB5SncGnMD8LxyOYT2HxF7CYwvFZOJrY3h1f_AwAAP__UoE-6Q== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (c); # Inject stats so that column 'b' has few unique values whereas column 'c' has # many unique values. @@ -102,6 +106,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykkd-r2jAUx9_3V4TzpCPTJm57CAiRrcMOp64VNhh9iM2ZFmrTJSlsSP_30faCV9F78d63nB-f8z3fkyO4PwUICH-uF7NoSQafo2STfF8MSRIuwk8b8pZ8iVffiCezhHhGHx6c_JiHcUg8GykyJZ6PtkChNBqX6oAOxC9gkFKorMnQOWPb1LFriPRfEAGFvKxq36ZTCpmxCOIIPvcFgoCN2hYYo9JoxwFQ0OhVXnRjvaxsflD2H1BIKlU6Qd5B2lAwtT8NdF7tEARr6MtE2StE-U3Rk1ZdGqvRoj7TSVvyuZYrm8-V2381eYl2zM8XL_C3H0g2nNp8t_cDyYdAYVV7QSSjklM5ofI9lR-o_HjTz-SeI8boKlM6vPR1dXLQmkG9w_44ztQ2w7U1WSfTh6uO6xIane-rvA-isit1v_wYZnfA_BLmT8KTMzho0ubN_wAAAP__9MUM1w== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (c); # If we add a not very selective filter, the flow is still moved to the gateway. @@ -142,6 +150,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykklFr2zAQx9_3KY57Sja1iWRnDEFAYXWZR-p0cWCD4Qc1vmUG1_IkGTZCvvuwPegSmmze3nQn_f4_6dAe3bcSJUaf7peLOIHRTZxu0g_LMaTRMnq7gZdwu17dgYdFCp6zXwsBH99F6whGnl8_wBz4GBbJTVdqmIMX13qMDCuTU6IfyaH8jBwzhrU1W3LO2La17w7E-XeUU4ZFVTe-bWcMt8YSyj36wpeEEjf6oaQ16ZzsZIoMc_K6KLtYr2pbPGr7Axmmta6chCvMDgxN458Cndc7QskP7N-k_D-kYoj0tig9WbITcWzs-xKUaMctpYyTzZuzyuCs8snUVMbmZCk_EmUt-acjz9z7juyO3puiIjsJjq9e0hc_UvzVeG6L3dd-iQxXjZegQqZmTL1mijMlmArOPikcMsXEXJl6Ep6-7Nng2ZDgNbnaVI7-KnnaDoryHfWDd6axW7q3Zttp-nLVcV0jJ-f73aAv4qrb6j7t7zC_CIsjeHoKiwFmcQoHF-Hwsjm8CM9O4Ozw4mcAAAD__1A-e3k= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (c); # However, if we add a selective filter, the flow is kept on the remote node. query T @@ -184,3 +196,7 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykktFv0zAQxt_5K073tIG31kmKkKVKniCDTG0ykkogoT6Y5CiRsjjYjgSq-r-jJEhbKpox9hZ_d7_77nO8R_ujQoHh59vVVRTD2bso22QfV-eQhavw7QZewnWarMHBVQaOQxTHYQrrMH0fwk0SxX8KHiQxOH6pYAnOu1Tw6UOYhp2SwxI4Mqx1QbG6I4viC3aCh1uGjdE5WatNJ-_7pqj4iWLOsKyb1nXylmGuDaHYoytdRSgw1he6mQXIsCCnyqpvOzDUrbuHrFM7QrE4sAeD-fTgjfpaUUqqIDObj8ajk40p75T5hQyzRtVWwAWeMuVPMb0uK0eGzIyPHQddgPS7OxRCRPHmzUlL739zes_I6Z80vfdqa20KMlQc_67HW_6y-ZrMjm50WZOZ-ePNK_rmziR_db405e778IkMk9YJkJxJj0mfyYDJBZOvT0YKRpEeeYgp2UbXlv7pJc67PFTsaLgfq1uT063ReW8zHJOe64WCrBuqi-EQ1UOpW_AhzCdhbxr2JuFgBPNj2H8C7B3DwSQ8P1p7e3jxOwAA__9d9n-X +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (c) STORING (b); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_union b/pkg/sql/opt/exec/execbuilder/testdata/distsql_union index f44da8df88bf..00f43d5968ee 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_union +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_union @@ -56,6 +56,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0ll-L2kAUxd_7KcJ9aumEeGcm-ydPu-1aEKxu1UJL8SE1wyK4TjqJoCt-92IUdi3mTmZiH5PxnHPPnR-YLRR_FpBA98dj_743CN4_9MaT8bf-h2Dc7Xc_T4J18GU0_BqsNy_B90FvOAju-_0zZ8PRQ3cUfPoZrIHBUmdqkD6rApJfgMCAAwMBDCQwiGHKIDd6popCm_1PtpWgl60h6TCYL_NVuX89ZTDTRkGyhXJeLhQkMEl_L9RIpZkyUQcYZKpM54sqZr15ucvN_Dk1G2AwztNlkQRhtE8ersokuEOY7hjoVflqX5Tpk4IEd6z5CGNtSmWi-DT9Dj_W2nMX-7cN8XIVhUdFdOgoa_1fbbXJlFHZOdMzQwx0qPOIn66gLr7zv-LjRvHxSTw63HCDC454GAlnii1DHK_4ypdil46XLCk8SqJDS1nr3xIk9OCYN18yb7JjEUbSGSTLEMcdX_uC5NARL1lSeJREh5ay1r8lSNwDJNF8yaLJjmVY_f-5gWQZ4rjjG1-QHDriJUsKj5Lo0FLW-rcESXiAJJsvWTbZcRw6Y2QZ4bjhW1-MHBri5SoKj4ro0FHW-reESLb8PDvjPFJFrpeFaug8ZaCyJ3XoUuiVmalHo2dVzOFxWOmqF5kqysMpHh56y8PRfsC3YiTF8kSM_4o5KRZ0smiTLElxTItjUsyv6LmvSPU1Lb6m76pDD35Dqm_p6NtW0UhTZtk40pght0BKg4a2dBo1lJZ0GjZrOo2bTU3jhhbekAaO226dJg4tyCHNnC2dt2KO08xxC3OcZo7b0mnmuIU5TjNnTXdjbrp79zcAAP__3g8zPw== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x); query T EXPLAIN (DISTSQL) SELECT x FROM xyz UNION SELECT x FROM xyz ORDER BY x @@ -109,6 +113,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJysl99u2kwQxe-_p1jN1VfVyMyu-WepUtqGqEgppEDVVi0Xrr2KLBGbro1EEvHuFSDhQJOZXceX2D575uz8ZrN5hOLPEkIYfr-5fj8ai_8vR7P57Mv1GzEbXg8_zsVGXE0nn8Xm_kF8-zScDsVG_Fq32yoWSnwdjyZj7kP9TigxmV4Op-LDD7EBD7I80ePoThcQ_gQEDyR4oMCDADzowMKDlcljXRS52X3yuBeMkg2EbQ_SbLUud48XHsS50RA-QpmWSw0hzKPfSz3VUaKN3wYPEl1G6XJvs7l_uFiZ9C4y9-DBbBVlRSha_s55si5DcYGw2HqQr8tq-aKMbjWEuPXsS7hKl6U22vidU__D851PtSthGI7G8_6LxtLF-Gl2bC68qhUemfQxHz5wMb5MizLN4tKXZ8mJZJ16Bh1rg-6LBtW66yw3iTY6OVl1saVKUPYZey4ZZ7kptfEVni__9sX1-yfrowOhFoD6suUr5_lkijgi2m16Pl3SNxlf1YqPTH7nCWWMqwH6By_LCbU26NacUGnfQGnTP9XyA2d8mSKO_es1ja9DemwyvqoVH5n8zvgyxhVdsia-1ga9mvgq-wYqm_4Frf0dxg1fpohj__pN4-uQHpuMr2rFRya_M76McUWXqomvtUG_Jr6BfQMDm_51Ws7wMiUcuzdoGl6H7NhceFUrPDLpndFljCuygproWhsMGrjaP2Mw1cUqzwp9dsV_fuX27uqvk1t9-D-hyNcm1jcmj_c2h5-TvW7_INFFeXiLhx-j7PBqV-BTMZLiDi2WpFjRYkWKA1ockOLuiRjPxZ3XiLukuEeX3aM3TNLqPqke0OIBTQnTLGQg4yijMUMmONKgMR1DmjROTaOGzIggDRsyXUMaN2R4Qxo47DNymjhu52jkGLWkiZMMcZImTnInG02cZMZF0shJ5nSTrzre5KvON0kTJxniJHPEcW2jiZPMuEgaOdVm_iTRzDE7p2jkztWL7X9_AwAA__-dZI_i +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x); # UNION with partial overlap. query T @@ -139,6 +147,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJysl99u2kwQxe-_p1jN1VfVyMyuzR9LldI2REVKIQWqtmq5cPEqskRsujYSScS7VwYJAk1mdh1fYvvsmbPzm83mEYo_S4hg8P3m-v1wJP6_HE5n0y_Xb8R0cD34OBMbcTUZfxab-wfx7dNgMhAb8WvdbqvFOxGIr6PheMR9qQWK8eRyMBEffogNeJDliR7Fd7qA6CcgeCDBAwUeBOBBCHMPViZf6KLITfXJ404wTDYQtT1Is9W6rB7PPVjkRkP0CGVaLjVEMIt_L_VEx4k2fhs8SHQZp8udzeb-4WJl0rvY3IMH01WcFZFo-ZXzeF1G4gJhvvUgX5fH5YsyvtUQ4dazL-EqXZbaaOOHp_7755XPYVOiKBqOZr0XfaWL79Po2Fx2VSs7MuErdrj0gYvzZVqUabYofXkWnYgW1jMIrQ06Lxoc111nuUm00cnJqvMtVYKyz9h1yTjNTamNr_B8-bcvrt87WR8dELUg1JctXznPJ1PEgdFOw_PpEr7J9KpWemTiu08o43wcoH_wspxQa4NOzQmV9h2UNg1ULT9wxpcp4tDAbsP4OoTHJtOrWumRie-OL-N8pEvWxNfaoFsTX2XfQWXTwKC1u8O44csUcWhgr2F8HcJjk-lVrfTIxHfHl3E-0qVq4mtt0KuJb2DfwcCmgWHLGV6mhEP7-g3D6xAdm8uuamVHJrw7uozzkaygJrrWBv0GrvbPGEx0scqzQp9d8Z9fuV1d_XVyq_f_JxT52iz0jckXO5v9z_FOt3uQ6KLcv8X9j2G2f1UV-FSMpDikxZIUK1qsSHFAiwNS3DkR47k4fI24Q4q7dNldesMkre6R6j4t7tOUMM1CBjKOMhozZIIjDRrTMaRJ49Q0asiMCNKwIdM1pHFDhjekgcMeI6eJ43aORo5RS5o4yRAnaeIkd7LRxElmXCSNnGRON_mq402-6nyTNHGSIU4yRxzXNpo4yYyLpJFTbeZPEs0cs3OKRu5cPd_-9zcAAP__k7-P3A== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x); # UNION ALL with swapped column orders. query T @@ -187,6 +199,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0ll1v2jwUx--fT2Gdq1aPUTiO05dc0a1MQmLQQSdtmrjIiFUhUZw5QYJWfPeJgETZmmPH1u6al39-53_8k8orlL-WkEL_28PwbjBiF_eD6eP0y_CSXUz7w_7HR7Zhnybjz2yzfWHjyX1_wj58Z9tL9nU0GI_Y3XBIvvhyefp7AxxWOlej7FmVkP4ABA4COMTAQQKHBGYcCqPnqiy12b_yWgcG-QbSLofFqlhX-9szDnNtFKSvUC2qpYIUHrOfSzVRWa5M1AUOuaqyxbLGbLYvvcIsnjOzBQ7TIluVKetEe_J4XaWsh7wXw2zHQa-rE6GssicFKe64-xRTbSplouR8gB7-f2I1gkQb0Nu66NFXNI4Re_RFr8KykXQCaJMro_K_Pz_bvTPOSHd0EYnzfTThu_8KnzjhkzM8tjhuh9OORCeKffy2zHE876twv9sU9mrsarhbY_SqLBtJgYqhh-HCfePCZeFxJ5I-ilnmOC78OlyxFoXRq7GrYm6N0auybCQFKiY8FIvdNx67LFx26n-lrRWzzHFc-E24Yi0Ko1djV8XcGqNXZdlIClQs9lBMum9cuiw86fgIZpniuO7bcMFa1EWPvq56ufVFr8KykRSolwz8GfjOlyeqLPSqVI5fnnFQ-ZM6dCn12szVg9HzGnO4HNe5-kauyurwFA8Xg9Xh0X7At2Ekw_IsjH-GBRmOaXIcQpZkOKHDCRkWV_TcV2T6mg5f02fVpQe_IdO3NPo2CI20ZZaNI60ZCouktGhoo9OqobTQadmsdFo3W5rWDS2-IS2csJ06bRxalEPaORtdBDknaOeExTlBOydsdNo5YXFO0M5Z6e2cm-3--x0AAP__SitYcQ== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); query T EXPLAIN (DISTSQL) (SELECT x FROM xyz ORDER BY y) UNION (SELECT x FROM xyz ORDER BY z) ORDER BY x @@ -237,6 +253,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0ll1v2jwUx--fT2Gdq1aPUTiO05dc0a1MQmLQQSdtmrjIiFUhUZw5QYJWfPeJgETZmmPH1i7z8s_v_I9_ErxC-WsJKfS_PQzvBiN2cT-YPk6_DC_ZxbQ_7H98ZBv2aTL-zDbbFzae3Pcn7MN3tr1kX0eD8YjdDYf0i5y9XJ4uN8BhpXM1yp5VCekPQOAggEMMHCRwSGDGoTB6rspSm_0rr3VgkG8g7XJYrIp1tb894zDXRkH6CtWiWipI4TH7uVQTleXKRF3gkKsqWyxrzGb70ivM4jkzW-AwLbJVmbJOtCeP11XKesh7gvdimO046HV1gpRV9qQgxR13H2SqTaVMlJzP0MP_T7hGkGgDetsYfSo3jhF79EWvwrKRdAJokyuj8r8_P9u9M85Id3QRifN9NOG7_wqfOOGTMzy2OG6H045EJ4o9FbeMcjzyq3DF23T2K-0ouVtj9KosG0mBlqGH5MJ948Jl4XEnkp6WWUY57vw63LIWndGvtKNlbo3Rq7JsJAVaJjwsi903HrssXHbqH1QfyyyjHHd-E25Zi87oV9rRMrfG6FVZNpICLYs9LJPuG5cuC086no5ZBjlu_DbcsRaN0aeyo2FufdGrsGwkBRomA_8SvvPliSoLvSqV45dnHFT-pA5dSr02c_Vg9LzGHC7Hda6-kauyOjzFw8VgdXi0H_BtGMmwPAvjn2FBhmOaHIeQJRlO6HBChsUVPfcVmb6mw9f0WXXpwW_I9C2Nvg1CI22ZZeNIa4bCIiktGtrotGooLXRaNiud1s2WpnVDi29ICydsp04bhxblkHbORhdBzgnaOWFxTtDOCRuddk5YnBO0c1Z6O-dmu_9-BwAA__9mrFxM +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); # Only one distinct processor should be used in the single node UNION case. query T @@ -281,6 +301,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ll9v2jwUh-_fTxGdq1ZvUGIn4U-kSXQr05AYdISLTVMuUuIVJEoyJ0ilFd99SijrkoBPTIrvCuSxfzl-To9fIPm9AhcG3-9GN8OxdnU79Gbet9G1duUNRoNPM22rfZ5OvmpP2-drbTieDaZe9u3NaHT0icn0djDVPv7QtqDDOgrZOHhkCbg_gYAOFHSwQAcbdHDA1yHm0ZwlScSzR15yYBg-gWvqsFzHmzT72tdhHnEG7guky3TFwIVZcL9iUxaEjBsm6BCyNFiu8m2ets_9mC8fA54l8OJgnbhay8h2nmxSV-tT8Hc6RJv0dfm3Ve-32iJIFsX1-gT8na9DkgYPDFyy08-L6SiNSU_GfFtns454yDgLCyv5GYk9cuRdvwTJwmPpJDZI6URm25i5RXVAhxX7lV71yfUHvnxY5H_9fXVSevW317Jkqu9FPGXcIE65Uv-fXN-uUbZjFXld9EiIcdSKYoOa5Rof3d4pbE_qy0VqyGXQlmFdpAskgrYVB6UngyroA6KoD5D6H_qgfW4f0PrnS-ucr9Uy7IuIKBG0ozgoPRlUgYhUkYhI_Q8ids4V0ap_vlad87Vb-Vh-fxElgnYVB6UngyoQ0VIkIlL_g4jdc0W065-vXed8ndZFNJSI2VMak56MqUBCW5GESPUPEvbe43p6ZP0pS-JonbBaN08zqxkLH9j-DJJow-fsjkfzfJv9x0nO5deNkCXp_le6_zBc5z_l51of7jSBCWlEO43onpgmEjUjcnCnCVyqmSztNKJ7YpqWafNf2irAZhm2hLAt3tkWwpSIt3aa9IcYRvpDDGP9gdBIfyA00h_tJv0hhpH-EMNYfyA00h8IjfRHR2hpVyxpt0l_9JoYLoYRw8UwZjhCI4YjNDYBZMZm9T-pzNyUpdEhIDU5pXFEc1KZIgVVCRWLTsRjBDGdVOaIjOoIjbiO0JjsGI7YjuGY7pUZKqW7mMZ0F9Oo7giO6Y7gmO6VQVrUvY3oXpkpUrpXZoqU7mIa011Mo7ojOKY7gmO6V-aplO5iGtNdTKO6IzimO4JjulemavGubYp1p5XZItTd3_33JwAA__80IHd3 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y); query T EXPLAIN (DISTSQL) (SELECT y FROM xyz) INTERSECT (SELECT y FROM xyz) ORDER BY y @@ -304,6 +328,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8mF1v4kYYhe_7K6y5SlQjMx98WaqUbUNVJBq2wEWrKhdemCZILKa2kcJG-e8V0KwTD37PTGxzlwCP5_hlzqMxzyz9d81CNvzz8_jT6M67uh3N5rM_xtfe1Ww4Hv4y9_ber9PJ797T_tu1N7qbD6ezw6vn3p1Mb4dT7-e_vD3z2SZe6rvoq05Z-DfjzGeC-Uwynynmsw6799k2iRc6TePk8JHnIzBaPrGw7bPVZrvLDi_f-2wRJ5qFzyxbZWvNQjaPvqz1VEdLnQRt5rOlzqLV-rjM0_7bzTZZfY2SQ4LZNtqkodcKDitPdlno3Qh2_-KzeJfll0-z6EGzkL_4H4vQqS2CcIlwu0qz1WaRBbwwgxteWCBnvuy9xyh9PPP5PIT8WIhOrSFUaYj8OrtNnCx1opfvrnS8SmlMgWaVR-g0FQFNKo_QrRDB_1DK36L0caazyTaQhUnN91sdvqn_p_GY-Wyt_8mubvj1T8nq4fH41_dtXn5bPZcdNouTTCeBNKb2Y-n1-xZjOzeR_y96JsRd3Iq3gWoXZ3x2-cG75bm9SLiFSALRCqSzzRxCdGsMIVxC5CrhDfrMOkS3QZ_x-mSCZlXmsxojoEmV-cwtQmWf8Qv5DOywV58ZU7P1mbDvsrDpsmwFylkoDiF6NYYQLiHyLosGhWIdotegUER9bUazKhNKjRHQpMqE4hahslDEhYQCdtirUIyp2QpF2ndZ2nRZtY6PRG5CcQjRrzGEcAmRd1k2KBTrEP0GhSLrazOaVZlQaoyAJlUmFLcIlYUiLyQUsMNehWJMzVYoyr7LyqbLnZazThwiDGqLIFwi5D1WDcrEOsSgQZmo-pqMZlUmkxojoEmVycQtQmWZqAvJBOywV5kYU_vIzzdnrj_V6TbepNrql5n2YWZ6-aBP30Ea75KF_pzEi-Myp38nR-74wlKn2eldefpntDm9dQj4FuYkLGhYFGH-FlbvYO4Gc1mFFrwSPahCyx5NS5LuVIE5GDlNC1GFlu1KdJ-mFblNuzTccYBFEe6ScI8uSI-EwT33SVhxeukBSXPQbE5LhYPFuaEVFzMAGqkB4MgNCAdyADiyA6flAvQAaOQHgCNBABwZAuGgLtwwzPsti0ZHK6aAG5rgtGR4FxSG1gy6ddozog0Wp03DBwA3VONUdpqGZadxWHaAo7LTOCq7MCzrUnZAo7IDHJUd4KjsCAc7XoBzKzo9GqqhcKPsglaNUODYTKsG3TptGtEHi9OmEeBEIwzVOJ35aRoe-mkcnvoBjo79NA7LbljWqew0DctO47DsNA7LDnC04-mzrARfuwQPyJwuu6RVI8FJWtKqAbcuadNIcKyQtGlkB-CGalzKDmhUdoCjsiMclB3g8CHfsKzTUz5Nw8d8GofP-TQOH_QBjnY8fZaV6Hujz7IF3Cw7rRoFTtKKVk3x1u9ffvgvAAD__zV_Boc= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y); # INTERSECT ALL and INTERSECT with MergeJoiner. query T @@ -375,6 +403,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzEmF2P2kYYhe_7K6z3alc1MjNjvixF2rQhChKFFJDaquXCgekuEsHUNhJktf-9MmSXtU3m-DWsuQsfz8zkeJ4zwz5S9N-SPOr--bn_vjewbj70xpPx7_1b62bc7Xd_nVhb6-No-Ju13X2z_vjUHXWtrfXPpl5XM0veWr3BpDsaJ1973-9DRL9LmOHoQ3dk_fKXtSWbVsFcD_yvOiLvbxJkkySbFNnkkk0Nmtq0DoOZjqIgTL7yuAd68y15dZsWq_UmTt6e2jQLQk3eI8WLeKnJo4n_ZalH2p_r0KmTTXMd-4vlfprt7tvdOlx89cMd2TRe-6vIs2pOMvNwE3vWnaDpk03BJj4OH8X-vSZPPNnFl_BxsYx1qEOnkZ7_8H4yzzEWz_N6g0k7M_FxrC8768GPHtID7Rd6XJzkLO51PuJyAalSAQmQ0OwyAbk_XNxxnM0qCOc61PPUSNOERF858T_85EcPYx0P147MZDzZrbWX9odsWup_45s7cfsuXNw_7P9VIPMGJ_NxEMY6dGQjm9TPPxy_WSC2U4l8H_TEIgZBLVg7qp7N-OT0rdT0grGtC-xqR9YcxRYfLOJlXzevIT4noUtGpEpFJEBGb6K-qFZ9UZH6IPNn9Ztl1ZfFd5YssrFUzXHZ7oFFvGys1jXcYyQkLhmRKhWRABm9iXuyWvdkRe6BzJ_da5V1TxXfWarIxnJr-2spzz2wiJeN1b6Ge4yExCUjUqUiEiCjN3FPVeueqsg9kPmze-2y7rnFd5ZbZGM1amzzwBJetlXnGuYx8hGXC0iVCkiAhN7EO7da79yKvAOZP3vXucRPzRPjj3S0DlaRLvQrsp5kpuf3-vAMomATzvTnMJjtpzm8HO65_RtzHcWHT8XhRW91-ChZ4GtYZGHxGnZTsOTBQpxFt86hpTqL7phpaUxcmRNXjMQFD84kzqVb59CZxLl0x0y7xsQb5sQbRrhpnrlpftZAr5aRbpvh9jlummHkJqCBm2YauQlo4GbH3IZ1UIe5MuXYCWikJ8KBnwBHgiIcGCpylZoOXoLgzZ0KJBW5dklP7oLJc_XCOgXNNDwGAY7OQTMOD0KAA9uEuVtFEwSfa1eWbmYa6gZwpJsZh7oBHOlmPlkEOFpErmRZuplLVoKSlZySzV--WCXLxoFuAEe6IRxdPM0lK0HJylzJcnQDNNIN4UA3gCPdEA50k-YDRoIDRprvr0A3aS5ZCUpWcko2v-VYJcvGkW6skmXjSDdzyUpQspJzgc8_ddYNno0j3Vh3eDaOdDMfMAocMMr8J5GsbtOnn_4PAAD__ygb0uo= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x); query T EXPLAIN (DISTSQL) (SELECT x FROM xyz WHERE x < 2) INTERSECT (SELECT x FROM xyz WHERE x >= 2) ORDER BY x @@ -404,6 +436,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy82Ftv4kYYBuD7_gprrhLVyMzBBCytlG3DapEobAGprdpcsDBNkFhMbSPBRvnvFbCJw8Hf62HGuQvg198h9iPwE0v_m7OItf_80v3Y6XlXd53haPh799q7Gra77V9H3tr7NOj_5q03370_PrcHbW_t_bOq1-XEE9depzdqD4bbw9Dh-sP2-P7grj3wfvnLWzOfLeKp7o2_6ZRFfzPOfCaYzyTzmWI-C9m9z5ZJPNFpGifbQ552gc50zaK6z2aL5Srbvn3vs0mcaBY9sWyWzTWL2Gj8da4HejzVSVBnPpvqbDyb78qsN99vl8ns2zjZMJ8Nl-NFGnm1YFu5v8oi75az-2efxassP32ajR80i_izX76FT7N5phOdBOFh_f372zr5WqIo6vRGzcLCwqTw29m5u-HlRcNzMP0ED69MCt_N0my2mGSBOJr8ZLI883XjPY7TxzPH502ElzUROm2iUdhEfp7VIk6mOtHTgzPtzlLYpkS7ylu4qaoFtKm8haZFC_5FXX4ep49DnfWXgTra1Giz1NEbAz92u8xnc_1vdnXLrz8ks4fH3V8l7q-WyRU2jJNMJ4E62drPxXjVS-zt3Ep-nPVMF724Fi-DsH685PP1D_XkBoiVMCwQtUAaEw6aeFWs4Zpwk-ldji8vGp-D-Y0RB4VzP3mFiJduolEh4tydoGhXRYg7bAFtqghxsxasEefvhDi4wl4QP9laacRFeUZEGUVkLVDGiIImXhW5cY2owfTc5fjyovE5mN8YUVA490tUiGjpJm4qRFS4EwztqghRhy2gTRUhataCNaLinRAFV9gLoidbK42oLM-ILKOIqu1-8pshCpp4VaTpGlGD6bnL8eVF43MwvzGioHDul6wQ0dJNNCtEVLoTDO2qCFGHLaBNFSFq1oI1ovKdEAVX2AuiJ1srjagqz4gqo0hYMyYUtPBqSMs1oQazc3fDy4uG52B6Y0BB4dwuVSGgpZtoVQiocqcX2lURoA5bQJsqAtSsBWtA1TsBCq6wF0BPtnbR89gzBQY6XcaLVJd61FrfLk1PH_T-n5DGq2SivyTxZFdm_7K_y-3emOo023_K9y86i_1H2wbfhjkZDumwIMOSDksyrOiwOg7zt-HGQZibhfmNTVpYpaVVWoF0SKatwrxpkxZWaWmVViDdIC9TEL4xCIvjcJMMt-gbpEWjUKf75rQpIUKFVoULEKdd4Q0Qp2XhgBZ-cpMdxoGJnL7cAE0gjWwCcYQTiCOdQBzxxE9uNROfQBoBBeJIKBBHRIE4MorTzvAWiNPSHMVPnOK0NaIOvkSA7y-AKkFbI4A1grZGAGsEbY0A1gjaGoG-f1lZA9LIGhBH1oA4sgbEkTXCyhqQRtaAOLIGxJE1II6sEbQ1AlgjaGsEsEbQ1khgjbSzRtLWSGCNBL-XgDWStkYCayRtjQTWSCtrQBpZA-LIGhBH1oA4skZaWQPSyBoQR9aAOLIGxJE1krZGAmskbY0E1kjaGgWsUXbWKNoaBaxRtDUKWKPA0xn0eIa2RgFrlJU1IA2f79hZA-LwCY-dNcrKGpBG1oA4sgbEkTUgjqxRtDUKWKNoaxSwRtHWhMCa0NCa--ef_g8AAP__HWJhhQ== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x); # INTERSECT ALL and INTERSECT with some overlap. query T @@ -434,6 +470,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzEmF1v4kYYhe_7K0bvVaIamZkxX5ZWYttltUgUtoDUVi0XXpgmSCx2bSOFRPnvlWEDsU3meAwxd8vH43n3eJ4zJk8U_bcil3p_fh187A_Zzaf-ZDr5fXDLbia9Qe_XKduyz-PRb-xh-8j--NIb99gD-2dTr8s5k7esP5z2xpPkax8HA4ioD4zfstH4U2_MfvmLbcmitb9QQ--7isj9mzhZJMgiSRY5ZFGDZhYFoT9XUeSHyVeedkB_8UBu3aLlOtjEydszi-Z-qMh9ongZrxS5NPW-rdRYeQsV2nWyaKFib7naLfOwfewG4fK7FyYTTAJvHbmsZicrjzaxy7rc6gqaPVvkb-LjClHs3Sly-bNVfIrPy1WsQhXajfQI-_eTpY7JuK7bH07bhymyIxyv-m3L7r3oPn3JLqfZ83FMYTLm67D4RdOSpdLiIK45k5dNy3lzzON1Nms_XKhQLVJXmiUk-sqJ_-sXL7qfqHgU2CIT-HQbKDdtFlm0Uv_GN11--yFc3t3v_nW8AW-m3zBJf-KHsQpt0cgm9fOb128WiO1UIj8uemKIoV_zA1vWsxmfXL6VWp4b7PECW9wWNVuWqQQwx2GTN69bCSZxXTgvWSovDgJ751Lg1ZYCr6gUQPovpdAsWwqi-DYTRXaZrNlOGSvBHIdd1rqulQZx8QvnJUvlxUFg72ylqNZKUZGVIP0XK1tlrZTFt5ksssuc2u4J19hKMMdhl7Wva6VBXPzCeclSeXEQ2DtbKau1UlZkJUj_xcp2WSud4tvMKbLLGrUyToIpDnusc10nDcLiF01LlkqLg7je2UinWiOdiowE6b8Y2bnET9oT1x-rKPDXkSr0a7WeZKYWd2p_DyJ_E87V19Cf75bZvxztuN0bCxXF-0_5_kV_vf8oGfA1zLMwfw07KViYwZyfRbfOoYU8i-7oaaFNXOoTlwaJczM4k7gp3TqHziRuSnf0tKNNvKFPvKGFm_qVm_p7DfRqaem2Hm6f46YeRm4CGripp5GbgAZudvRtWAd1mCtTEzsBjfREOPAT4EhQhANDea5S08ELELy-U4GkPNcu6cUdsHiuXoxOQT0Nj0GAo3NQj8ODEODANq7vVt4Ewefa1Ug3PQ11AzjSTY9D3QCOdNOfLBwcLTxXska66UtWgJIVJiWbf_gyKlljHOgGcKQbwtGDp75kBShZkStZE90AjXRDONAN4Eg3hAPdhP6AEeCAEfrnV6Cb0JesACUrTEo2v-WMStYYR7oZlawxjnTTl6wAJStMHuDzd93oCd4YR7oZPcMb40g3_QEjwQEj9X8Syeo2e_7p_wAAAP__PE7xoQ== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); query T EXPLAIN (DISTSQL) (SELECT y FROM xyz WHERE x < 3) INTERSECT (SELECT y FROM xyz WHERE x >= 1) ORDER BY y @@ -463,6 +503,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy82F1v2lYcBvD7fQrrXCWakTkv5sVSJbqFqkgMOkDapi0XFM4SJIqZbaTQKN99AhocXvx_jn3s3DWEh_P0qf0T9TOL_1uygHX__NL_2Bs4N3e98WT8e__WuRl3-91fJ87W-TQa_uY8bb87f3zujrrOk_PPpl6XM0feOr3BpDsa796G3q4_OPzWGY7uuiPnl7-cLXPZKpzrwfSbjlnwN-PMZYK5TDKXKeYyn927bB2FMx3HYbR7y_M-0Js_saDussVqvUl2L9-7bBZGmgXPLFkkS80CNpl-XeqRns515NWZy-Y6mS6W-2Oett8762jxbRrtGozX01UcODVvd_JwkwROh7sdwe5fXBZukvSEOJk-aBbwF9e8xafFMtGRjjz_tMLh9d1R6TJBEPQGk9axRXYFkafC2yF4qUvIQktwMMXMkeZLqDwV7hZxsljNEk-czdDhZwekma9b53EaP155f1rCL1bCL7VEI7NE-jmbVRjNdaTnJ5-0_5TMmhJtlVZoVlUBLZVWaFlUcAu1_DyNH8c6Ga49dbbUZLvWwRsdP_b7zGVL_W9y0-G3H6LFw-P-T-nNlvnXaue5wsZhlOjIUxer_ZxtWt1gt2uT_PjUKy0GYS1ce379fOTr55-iynOIZgCaJ2qeLII76HEkrVEd7nmmKHkLWWgLDsaw4B1USGXlFfJuXKJRIe-8PFvRVlm8l1gBLZXFe74K1rzzd-IdXGGvvF-sZsy7MDdFmJAia54qwivocSSlWR2vOabgJW8hC23BwRgWvIIKqWyiQl6NSzQr5FWUZxvaKovXEiugpbJ4zVfBmlfxTryCK-yV14vVjHmV5qZIE1JUbf_0IDevoMeRlFZ1vOaYgpe8hSy0BQdjWPAKKqSyyQp5NS7RqpBXWZ5taKssXkusgJbK4jVfBWte5TvxCq6wV14vVjPmVZmbokxI8WtFcAUtjqC0q8M1xxC81CVkoSU4mMKCVlAhVU1VSKtxiXaFtKryXENbZdFaYgW0VBat-SpY06reiVZwhb3SerFaoee-Vw4Y6XgdrmJt9Ei3vhtNzx_04R8hDjfRTH-Jwtn-mMOPw31u_8Jcx8nht_zwQ291-NWu4NswJ8M-HRZkWNJhSYYVHVbnYf423DgJ83xh3rRJC6u0tEorkPbJtFWYt2zSwiotrdIKpBvkZQrCzRxhcR5ukeE2fYO0aRTqdG9Om-IjVGhVuABx2hXeAHFaFg5o4Rc32WkcmMjpyw3QBNLIJhBHOIE40gnEEU_84lbL4xNII6BAHAkF4ogoEEdGcdoZ3gZxWpqz-IVTnLZG1MGXCPD9BVAlaGsEsEbQ1ghgjaCtEcAaQVsj0PcvK2tAGlkD4sgaEEfWgDiyRlhZA9LIGhBH1oA4sgbEkTWCtkYAawRtjQDWCNoaCayRdtZI2hoJrJHg_0vAGklbI4E1krZGAmuklTUgjawBcWQNiCNrQBxZI62sAWlkDYgja0AcWQPiyBpJWyOBNZK2RgJrJG2NAtYoO2sUbY0C1ijaGgWsUeDpDHo8Q1ujgDXKyhqQhs937KwBcfiEx84aZWUNSCNrQBxZA-LIGhBH1ijaGgWsUbQ1ClijaGt8YI2f05r7l5_-DwAA__9zsYA8 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); # INTERSECT ALL and INTERSECT with swapped column orders. query T @@ -528,6 +572,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ll9v2jAQwN_3KaJ7KppRYifhT6RJ7VamITHoCA-bJh5S4hUkSjInSNCq330iFLEQ4otJ6zco_p0vd7_r5RmSv0vwoPfzbnDTHxpXt31_4v8YNIwrvzfofZkYG-PrePTd2GyfjNH4tjc2Pv8ytg2jP5z0xv7uwM1gID381Dh-3gCBVRTyYfDIE_B-AwUCDAjYQMABAi5MCcQimvEkicTuyHMG9MMNeBaBxSpep7s_TwnMIsHBe4Z0kS45eDAJ7pd8zIOQC9MCAiFPg8Uyu2azfbqOxeIxEFsg4MfBKvGMprm7ebROPeOawvSFQLROX8Mfo95vjXmQzPPxsvNTAkkaPHDw6Au5LE1Xa5qsNM1jnPUqEiEXPMxFmu5I7MiZZ_0WJHOfp6PYpCcdmWxj7uUtAgJL_ie9uqaNT2LxMM8-lT768bFsler7kUi5MKl7WqmPpfGdCmU7V5HXoGeSGEbNKDaZdVrjs9e7uetpdbloBblM1jTtd5kChURbmhNlpYlqmAOqaQ6Q-h_moHXpHLDq_WVV-ms3TeddRFRItK05UVaaqAYRmSYRkfofRGxfKqJdvb92lf46zWwtv72ICol2NCfKShPVIKKtSUSk_gcRO5eK6FTvr1Olv27zXTRUSLOrNU1WmqYGCR1NEiLVP0jYfYvX0zPxxzyJo1XCK715Wrua8fCB73uQRGsx43cimmXX7L-OMi573Qh5ku5_Zfsv_VX2U9bX6nC7DkxpLdqtRXflNFWoGVWD23Xgk5qp0m4tuiun2Slt_U_bOdg6hW0p7MhvdqQwo_Kr3TrzIYeR-ZDD2HwgNDIfCI3MR6vOfMhhZD7kMDYfCI3MB0Ij89GWWtqRS9qpMx_dOobLYcRwOYwZjtCI4QiNbQCVtVn8T6qyN1VpdAkobU5lHNGcFrZITlXK5KJT-RpBTKeFPaKiOkIjriM0JjuGI7ZjOKZ7YYcq6S6nMd3lNKo7gmO6Izime2GR5nVvIboXdoqS7oWdoqS7nMZ0l9Oo7giO6Y7gmO6Ffaqku5zGdJfTqO4IjumO4Jjuha2af9e25Lqzwm6R6j59-fAvAAD__yMAfUs= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); query T EXPLAIN (DISTSQL) (SELECT x FROM xyz ORDER BY y) INTERSECT (SELECT x FROM xyz ORDER BY z) ORDER BY x @@ -551,6 +599,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8mE1v6kYUhvf9FdZZJaoRzIz5slQptw1VkWi4BRatqix8YZogcTG1jQSJ8t8roJETBp93Jrazy4cfz-vDvI_GPFP674pCGvz5dfRleOdd3Q6ns-kfo2vvajoYDX6ZeTvv18n4d2-3f_LGk9vBxPv5L29_7Q3vZoPJ9HABd-HTdf7zjnxaxwt9F33XKYV_kyCfJPmkyKeAfGrTvU-bJJ7rNI2TwyXPR2C42FHY8mm53myzw5_vfZrHiabwmbJlttIU0iz6ttITHS100myRTwudRcvVcZnd_ulmkyy_R8mefJpuonUaeo3mYeXxNgu9G0H3Lz7F2yy_fZpFD5pC8eJ_LEK7sgjSJcLtMs2W63nWFGczMBbImW977zFKHy9cn4dQHwvRrjREUBgiv892HScLnejFuzsd71IYU6JZ5RHadUVAk8ojdEpE8D-U8rcofZzqbLxpqrNJzfYbHb4xwZfRiHxa6X-yqxtx_VOyfHg8_mSxzbsuO2waJ5lOmsqY2o-F9-9ZjO3SRP6_6YUQd3Ej3jSD1vmMLy7ff7e8sBeJsBBJUzaaytlmDiE6FYaQLiFylYgafWYdolOjz0R1MkGzKvJZhRHQpIp85hahtM_EJ_kM7LBXnxlTs_WZtO-ytOmyajQDZ6E4hOhWGEK6hMi7LGsUinWIbo1CkdW1Gc2qSCgVRkCTKhKKW4TSQpGfJBSww16FYkzNVijKvsvKpstB4_hK5CYUhxC9CkNIlxB5l1WNQrEO0atRKKq6NqNZFQmlwghoUkVCcYtQWijqk4QCdtirUIyp2QolsO9yYNPldsNZJw4R-pVFkC4R8h4HNcrEOkS_RpkE1TUZzapIJhVGQJMqkolbhNIyCT5JJmCHvcrEmNpHvr65cP-JTjfxOtVW38y0DjPTiwd9-gzSeJvM9dcknh-XOf06PnLHPyx0mp3-q06_DNenfx0CvoUFC0selueweAsH72DhBgtVhpaiFN0vQ6suTyuWbpeBBRg5T0tZhlatUnSPpwN2m3Z4uO0Ay3O4w8JdviBdFgbP3GPhQPBL91lagGYLXioCLC4MrbiYAdBIDQBHbkA4kAPAkR0ELxegB0AjPwAcCQLgyBAIB3URhmHeb1k0Ol4xZ7ihCcFLRnRAYXjNoEfnPSNbYHHeNKIPcEM1TmXnaVh2HodlBzgqO4-jskvDsi5lBzQqO8BR2QGOyo5wsOMlOLei06OhGg43yi551cgAHJt51aBH500je2Bx3jQSnGikoRqnMz9Pw0M_j8NTP8DRsZ_HYdkNyzqVnadh2Xkclp3HYdkBjnY8f5ZV4GNX4AVZ8GVXvGoUOEkrXjXg0RVvGgWOFYo3jWoD3FCNS9kBjcoOcFR2hIOyAxy-5BuWdXrL52n4ms_j8D2fx-GLPsDRjufPsgp9bvxZ9gw3y86rJgAn6YBXzfmj37_88F8AAAD__zvnDFs= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); # INTERSECT ALL and INTERSECT with different numbers of ORDER BY columns. query T @@ -575,6 +627,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ll9v2jAQwN_3KaJ7KppRYifhT6RJ7VamITHoCA-bJh5S4hUkSjInSNCq330iFLEQ4otJ67em8c--3P2O8zMkf5fgQe_n3eCmPzSubvv-xP8xaBhXfm_Q-zIxNsbX8ei7sdk-GaPxbW9sfP5lbBtGfzjpjf3dgpvBQL6YGE-N4-MGCKyikA-DR56A9xsoEGBAwAYCDhBwYUogFtGMJ0kkdkueM6AfbsCzCCxW8Trd_XtKYBYJDt4zpIt0ycGDSXC_5GMehFyYFhAIeRosltkxm-3TdSwWj4HYAgE_DlaJZzTN3cmjdeoZ1xSmLwSidfq6_XHX-60xD5J5fr9s_ZRAkgYPHDz6Qi4L09UaJisN87jPehWJkAse5naa7khsyZlv_RYkc5-no9ikJxWZbGPu5UUCAkv-J726po1PYvEwz_4q_fTjZ9kq2fcjkXJhUvc0Ux9L93cqpO1cRl43PRPEMGpGscms0xyfPd7NHU-ry0UryGWypmm_SxcoBNrSHCgrDVRDH1BNfYDk_9AHrUv7gFWvL6tSX7tpOu8iokKgbc2BstJANYjINImI5P8gYvtSEe3q9bWr1NdpZmP57UVUCLSjOVBWGqgGEW1NIiL5P4jYuVREp3p9nSr1dZvvoqFCmF2tYbLSMDVI6GiSEMn-QcLuW1xPz-w_5kkcrRJe6eZp7XLGwwe-r0ESrcWM34lolh2zfxxlXHbdCHmS7t-y_UN_lb3K6lodbteBKa1Fu7XorpymCjmjanC7DnySM1XarUV35TQ7pa3_aTsHW6ewLYUd-cmOFGZUfrRbpz_kMNIfchjrD4RG-gOhkf5o1ekPOYz0hxzG-gOhkf5AaKQ_2lJLO3JJO3X6o1vHcDmMGC6HMcMRGjEcobEJoDI2i7-kKnNTlUaHgNLkVMYRzWlhiuRUpUwuOpWPEcR0WpgjKqojNOI6QmOyYzhiO4ZjuhdmqJLuchrTXU6juiM4pjuCY7oXBmle9xaie2GmKOlemClKustpTHc5jeqO4JjuCI7pXpinSrrLaUx3OY3qjuCY7giO6V6Yqvm7tiXXnRVmi1T36cuHfwEAAP__dYp-EA== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); query T EXPLAIN (DISTSQL) (SELECT x FROM xyz ORDER BY y) INTERSECT (SELECT x FROM xyz ORDER BY y, z) ORDER BY x @@ -598,6 +654,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8mE9v6kYUxff9FNZdJaoRzIz5Z6lSXhuqItHwCixaVVn4wTRB4mFqGwkS5btXQCMnDL5nJrazC4l_nuPLnJ_Geab03xWFNPjz6-jL8M67uh1OZ9M_Rtfe1XQwGvwy83ber5Px795u_-SNJ7eDiffzX97-2hvezQaT6eEC9kLfe7rOP-7Ip3W80HfRd51S-DcJ8kmST4p8CsinNt37tEniuU7TODlc8nwEhosdhS2fluvNNjv8-t6neZxoCp8pW2YrTSHNom8rPdHRQifNFvm00Fm0XB2X2e2fbjbJ8nuU7Mmn6SZap6HXaB5WHm-z0LsRdP_iU7zN8tunWfSgKRQv_scitCuLIF0i3C7TbLmeZ01xNgNjgZz5tvceo_TxwvV5CPWxEO1KQwSFIfL7bNdxstCJXry70_EuhTElmlUeoV1XBDSpPEKnRAT_Qyl_i9LHqc7Gm6Y6m9Rsv9HhGxl8GY3Ip5X-J7u6Edc_JcuHx-NPFtu867LDpnGS6aSpjKn9WHj_nsXYLk3k_5teCHEXN-JNM2idz_ji8v13ywt7kQgLkTRlo6mcbeYQolNhCOkSIleJqNFn1iE6NfpMVCcTNKsin1UYAU2qyGduEUr7THySz8AOe_WZMTVbn0n7LkubLqtGM3AWikOIboUhpEuIvMuyRqFYh-jWKBRZXZvRrIqEUmEENKkiobhFKC0U-UlCATvsVSjG1GyFouy7rGy6HDSOr0RuQnEI0aswhHQJkXdZ1SgU6xC9GoWiqmszmlWRUCqMgCZVJBS3CKWFoj5JKGCHvQrFmJqtUAL7Lgc2XW43nHXiEKFfWQTpEiHvcVCjTKxD9GuUSVBdk9GsimRSYQQ0qSKZuEUoLZPgk2QCdtirTIypfeTfNxfuP9HpJl6n2uo_M63DzPTiQZ--gzTeJnP9NYnnx2VOH8dH7viLhU6z01_V6cNwffrTIeBbWLCw5GF5Dou3cPAOFm6wUGVoKUrR_TK06vK0Yul2GViAkfO0lGVo1SpF93g6YLdph4fbDrA8hzss3OUL0mVh8Mw9Fg4Ev3SfpQVotuClIsDiwtCKixkAjdQAcOQGhAM5ABzZQfByAXoANPIDwJEgAI4MgXBQF2EY5v2WRaPjFXOGG5oQvGREBxSG1wx6dN4zsgUW500j-gA3VONUdp6GZedxWHaAo7LzOCq7NCzrUnZAo7IDHJUd4KjsCAc7XoJzKzo9GqrhcKPskleNDMCxmVcNenTeNLIHFudNI8GJRhqqcTrz8zQ89PM4PPUDHB37eRyW3bCsU9l5Gpadx2HZeRyWHeBox_NnWQW-dgVekAVfdsWrRoGTtOJVAx5d8aZR4FiheNOoNsAN1biUHdCo7ABHZUc4KDvA4Uu-YVmnt3yehq_5PA7f83kcvugDHO14_iyr0PfGn2XPcLPsvGoCcJIOeNWcP_r9yw__BQAA__8-7g0g +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); # INTERSECT ALL and INTERSECT with compatible ORDER BY columns that are not in the final result. query T @@ -706,6 +766,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8lt9uokAUh-_3Kci5arNjYAbwD8kmdls3a-LWrnjRzYYLKrPVxAo7YKJtfPcNWLdF7BxGlLtS-GYOZ76fhxeI_87Bgd793eCqf6td3PTdsftzcKlduL1B73qsrbVvo-EPbbV-vtR699e9u7F2NRj8v73SrtzcM8PRTW-kff2lrYHAIgz4rf_EY3B-AwUCDAiYQMACAjZ4BCIRTngchyJ95CUD-sEKHIPAbBEtk_TfHoFJKDg4L5DMkjkHB8b-w5yPuB9woRtAIOCJP5tn26zWz91IzJ58kVbgRv4idrSGnu48XCaO1mXgbQiEy-R1-bdVH9ba1I-n-fW6FLyNRyBO_EcODt2Q48q0FcuklcpkH5b5ts5yEYqACx7kVvJSEnvkwLt-9-Opy5NhpNO9ExmvI-68kwcIzPmf5KJLL7-I2eM0--vD9357J1Ol9W4oEi50au-36fOH61slenaoHa-LHijiNmyEkc6M_QYf3N7ObU_Lm0VLmKWzhm6eJQIKhTaVCz1lCGi9IaB1hABp_i4EzWNDwMofLitzuGZDt85ioUKhLeVCT2khq9dCVoeFSPN3FraOtdAsf7hmmcO1Gtk0Pr2FCoW2lQs9pYVmvRaadViINH9nYftYC63yh2uVOVy7cRYHFcrsKJZ5SgOteg206jAQaf3OwM4pPkkPrD_icRQuYl7qa9NIG8aDR749gDhcigm_E-Ek22Z7Ocy47Csj4HGyvcu2F_3F9lZaYHm4VQWmtBJtV6I7cpoq9Iypwa0q8F7PVGm7Et2R02yfNt7TZg429mFTClvy07KkMKPyre0q-ZDDSD7kMJYPhEbygdBIPppV8iGHkXzIYSwfCI3kA6GRfLSklrblkrar5KNTxXA5jBguhzHDERoxHKGxCaAyNou_pCpzU5VGh4DS5FTGEc1pYYrkVKVMLjqVjxHEdFqYIyqqIzTiOkJjsmM4YjuGY7oXZqiS7nIa011Oo7ojOKY7gmO6FwZpXvcmonthpijpXpgpSrrLaUx3OY3qjuCY7giO6V6Yp0q6y2lMdzmN6o7gmO4IjulemKr5b21DrjsrzBap7t7m078AAAD__2ZMc04= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (y); query T EXPLAIN (DISTSQL) (SELECT y FROM xyz) EXCEPT (SELECT x AS y FROM xyz) ORDER BY y @@ -800,6 +864,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzEmF1v2kgUhu_3V4zOVaI1MjNjvixVSrelKhIbsoC0Xe1y4cJsgkQxaxsJGuW_rwwNCZjO62OIuSsfz8zp6_OcGfJI8X8z8qn95a77vnMrrj52BsPBH91rcTVod9sfhmIlPvV7v4vV-rv483O73xYr8c-yWtVjoa5F-8uH9t1QvO924ffNuxTo9T-2--K3v8SKHJqHE3MbfDMx-X-TJIcUOaTJIY8cqtHIoUUUjk0ch1H6lccN0JmsyK86NJ0vlkn69sihcRgZ8h8pmSYzQz4Ng68z0zfBxERulRyamCSYzjbbrNbfbxbR9FsQrcmhwSKYx76ouOnOvWXiixtJoyeHwmXysnycBPeGfPnk5C_h03SWmMhEbm1__-376T67GH3f79wOmwf7viz1dS0egvhhf51NnS-1KU5tr-OR58tHF8pHgoDSvjlHQt5Pq3tZZzkPo4mJzGRvpVFKoq8c-S9-DuKHgUl6C1cdhDxcL4z_Sh5yaGb-Ta5u5PW7aHr_sPlXjsRrnMQHYZSYyFW1w5h-_en69RyZHYvjx6JHirgNK-HC1dXDgI9u39jbXjKaOkdPu6riarb1oIhdV9cvYD0noHMmpAslJEFEb-O9LNd7WYb3IPFn7-tFvVf5-0rlaStdcT22eKCIXVs1LiAeIyB5zoR0oYQkiOhtxFPliqfKEA8k_ixeo6h4On9f6Txt5VU2t1GeeKCIXVs1LyAeIyB5zoR0oYQkiOhtxNPliqfLEA8k_ixes6h4Xv6-8vK0Va3C1g6UsGuq1gW0Y8Qjz5ePLpSPBAG9jXReudJ5ZUgHEn-WrnWOn5dH1u-beBHOY5Prl2M1DcxM7s32AcThMhqbuygcb7bZvuxtuM0bExMn20_l9kVnvv0oLfA1LA9h-Rr29mDJg6U8iW6cQit9Et2y08qauLYnrhmJKx58kDiXbpxCHyTOpVt22rMmXrMnXrPCdfuzrtufNdCrYaWbdrh5ipt2GLkJaOCmnUZuAhq42bJPwyoYh5lhyrET0EhPhAM_AY4ERTgwVGZG6n7wCgRvn6lAUpmZLvube2DzzHhhnYJ2Gh6DAEfnoB2HByHAgW3SPltlHQSfma4s3ew01A3gSDc7DnUDONLNfrJIcLTIzJBl6WYfsgoMWcUZstnLF2vIsnGgG8CRbghHF0_7kFVgyKrMkOXoBmikG8KBbgBHuiEc6KbsB4wCB4yy31-Bbso-ZBUYsoozZLObs4YsG0e6sYYsG0e62YesAkNWcS7w2ZZj3eDZONKNdYdn40g3-wGjwQGj7X8SOdRt9PTL_wEAAP__Gz3Neg== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x); query T EXPLAIN (DISTSQL) (SELECT x FROM xyz WHERE x < 2) EXCEPT (SELECT x FROM xyz WHERE x >= 2) ORDER BY x @@ -829,6 +897,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy82F9v4kYUBfD3fgprnhLVyMwfE7C0UrYbVotEQwpI3arNAwvTBInF1DYSbJTvXgELDn98j4cZ8rYhHM-5d81PxC8s_W_CItb8-tD-2Lr3ru5avX7vj_a1d9Vrtpuf-t7C-9zt_O4tlj-8P780u01v4f0zr1bl0BPXXvPrp-ZDH75Xf1i9udO9a3a93_7yFsxn03ik7wffdcqivxlnPhPMZ5L5TDGfhezRZ7MkHuo0jZPVW17WgdZowaKqz8bT2Txbvfzos2GcaBa9sGycTTSLWH_wbaK7ejDSSVBlPhvpbDCerI9ZLH_czpLx90GyZD7rzQbTNPIqwerkzjyLvFvOHl99Fs-z_PJpNnjSLOKvfvkKn8eTTCc6CcL98zevr87ZrTCKotZ9v154rjA59-3o3N3s8qzZORh-dU-g6ZXJyXfjNBtPh1kgDkY_Gi3PfFt6z4P0-cT78xLheSVCpyVqhSXy68yncTLSiR7tXWl9lcKaEu0qr3BzqQpoU3mFukUF_6yWXwbpc09nnVmgDjbVX850tAXwY7vNfDbR_2ZXt_z6QzJ-el7_q8Snq2Fye_XiJNNJoI5W9muxXNUSSzu1j59XPdHiPq7EsyCsHm749Pn7dHIDwkoIFohKII39BiV2htUc-20yvMvp5VnTczC-ueDg5BxPfkHBS5eoXVBw7o5PtKsiwR1WQJsqEtysgrXg_D0EB7fXVvCjlZUWXJRHRJQxRFYCZSwoKLEz5MaxoAbDc5fTy7Om52B8c0HByTle4oKCli5xc0FBhTu-0K6KBHVYAW2qSFCzCtaCivcQFNxeW0GPVlZaUFkeEVnGEFVZ_6VvJigosTOk7lhQg-G5y-nlWdNzML65oODkHC95QUFLl6hfUFDpji-0qyJBHVZAmyoS1KyCtaDyPQQFt9dW0KOVlRZUlUdElTEkrBj7CSrsBGk49tNgdO5udnnW7BwMb64nODmHS11Qz9IlGhfUU7mjC-2qSE-HFdCmivQ0q2Ctp3oPPcHttdXzaGVnPYM9cUBXp7N4mupSj1erq43p0ZPe_A-k8TwZ6ockHq6P2fzYWefWL4x0mm1-yzc_tKabX60Kvg1zMqzosCDDkg5LMhzSYXUY5m_Dtb0wNwvzG5u0sEpLq7QC6ZBMW4V53SYtrNLSKq1AukbepiB8YxAWh-E6GW7QH5AGjUKV7s1pU0KECq0KFyBOu8KBDZyWhQPU-NGHbD9eA3H6dgM0gTSyCcQRTiCOdAJxxBM_-qiZ-ATSCCgQR0KBOCIKxJFRnHaGN0CcluYgfuQUp60RVfAlAnx_AVQJ2hoBrBG0NQJYI2hrBPoCRVsjgDXCyhqQRtaAOLIGxJE1II6sEVbWgDSyBsSRNSCOrAFxZI2grRHAGkFbI4A1grZGAmuknTWStkYCayT4ewlYI2lrJLBG0tZIYI20sgakkTUgjqwBcWQNiCNrpJU1II2sAXFkDYgja0AcWSNpaySwRtLWSGCNpK1RwBplZ40CT2aANYq2RqHnK7Q1ClijaGsUsEZZWQPS8PmOnTUgDp_w2FmjrKwBaWQNiCNrQBxZA-LIGkVbo4A1irZGAWsUbU0IrAkNrXl8_eX_AAAA___oPFwV +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x); # EXCEPT ALL and EXCEPT with some overlap. query T @@ -859,6 +931,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzEmF1v4kYYhe_7K0bvVaIamZkxX5ZWYrvLapFoSAGpW7VcePE0QWKxaxspJMp_rwwbCDaZ4zHE3G0Ij-fdwzxnhjxR_N-CXOp9ux187N-wq8_98WT8x-CaXY17g96nCVuzL6Ph7-xh_cj-_Nob9dgD-2dVr0v1gfFr1vv2qXc7YR8HAwjMmLxmw9Hn3oj99hdbk0XLwFc33g8Vk_s3cbJIkEWSLHLIogZNLQqjYKbiOIjStzxtgL7_QG7dovkyXCXpy1OLZkGkyH2iZJ4sFLk08b4v1Eh5vorsOlnkq8SbLzbLPKwfu2E0_-FF6QTj0FvGLqvZ6crDVeKyLre6gqbPFgWrZL9CnHh3ilz-bBWf4st8kahIRXbjcITt6-lS-yRd1-3fTNq7KbIj7J_6fc3uvfj-8JFdTtPn_ZjCZMzXYfGzpiVLpcVBXDMmz5uW8-aY--eslkHkq0j5B0-apiR6y5H_61cvvh-rZBjaIhP4ZB0q95VVZNFC_Ztcdfn1h2h-d7_51z79N6NvmEQ_DqJERbZoZGP69c3nNwtkdiyOnw89MsRNUAtCW9azAR9dvnWwPDfY4AX2ty1qtizTB2CO3Q5vXrYPTOI6c16yVF4cBPbOjcCrbQReRSOA6F8aoVm2EUTxPSaKbDFZs50ySoI5dlusdVklDeLiZ85LlsqLg8DeWUlRrZKiCiVB9C9KtsoqKYvvMVlkizm1zcXWWEkwx26LtS-rpEFc_Mx5yVJ5cRDYOyspq1VSVqEkiP5FyXZZJZ3ie8wpssUatTJCgil2G6xzWSENwuJnTUuWSouDuN5ZR6daHZ0qdATRv-jYOcfX2CPPH6k4DJaxKvQNtZ4Gpvw7tf0A4mAVzdRtFMw2y2x_HG64zQu-ipPtb_n2h_5y-6t0wNcwz8L8NewcwNwM5vwkunUKLeRJdEdPC23iUp-4NEhcmMGZxE3p1il0JnFTuqOnHW3iDX3iDS3c1H_WTf1nDfRqaem2Hm6f4qYeRm4CGripp5GbgAZudvRtWAd1mCtTEzsBjfREOPAT4EhQhANDea5SD4MXIHh9pwJJea5dDhd3wOK5ejE6BfU0PAYBjs5BPQ4PQoAD27i-W3kTBJ9rVyPd9DTUDeBINz0OdQM40k1_snBwtPBcyRrppi9ZAUpWmJRs_vJlVLLGONAN4Eg3hKOLp75kBShZkStZE90AjXRDONAN4Eg3hAPdhP6AEeCAEfr7K9BN6EtWgJIVJiWbX9yoZI1xpJtRyRrjSDd9yQpQssLkAp_fckY3eGMc6WZ0hzfGkW76A0aCA0bq_ySS1W36_Mv_AQAA__9SNOwx +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); query T EXPLAIN (DISTSQL) (SELECT y FROM xyz WHERE x >= 1) EXCEPT (SELECT y FROM xyz WHERE x < 3) ORDER BY y @@ -888,6 +964,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy82N9v2lYcBfD3_RXWfUo0I3N_mIClSnQNVZFYyABpnbY8ULhLkChmtpFCo_zvE1Bw-OHvufa189YQDvf01P6I-oXF_81ZwDpf73sfu3fO1W13OBr-0bt2roadXufTyFk7nwf9353n9Q_nzy-dQcd5dv5Z1etSf3D4tdP5-qlzP4Jvnjjy2ukPbjsD57e_nDVz2SKc6rvxdx2z4G_GmcsEc5lkLlPMZT57cNkyCic6jsNo85aXbaA7fWZB3WWzxXKVbF5-cNkkjDQLXlgyS-aaBWw0_jbXAz2e6sirM5dNdTKezbfHPK9_tJfR7Ps42jQYLseLOHBq3ubk_ioJnDZ324I9vLosXCXpCXEyftQs4K-ueYvPs3miIx15_nGF3eubo9IVgyDo3o2ahxbZFUSeCm-H4KUuIQstwcEUE0eaL6HyVLidxclsMUk8cTJDm58ckGa-rZ2ncfx04f1pCb9YCb_UEo3MEunnrBZhNNWRnh590vZTMmtKtFVa4aaqCmiptELTooJbqOWXcfw01El_6amTpUbrpQ72Mn7s9ZjL5vrf5KrNrz9Es8en7Z_SOy3z79TKc3kNwyjRkafOJvs1G7S6wWiX9vj5qRda3IW1cOn59dOFL59_LCrPwZmBZp6oebKI7KDHwbNGdbLnmaLkLWShLTgYw8J2UCFllVdou3GJRoW28_JgRVtl2V5iBbRUlu35Kljbzt_DdnB57W0_m8zYdmEOijDxRNY8VcRW0OPgyU11tuaYgpe8hSy0BQdjWNgKKqSsiQptNS5xU6GtojzY0FZZtpZYAS2VZWu-Cta2ivewFVxee1vPJjO2VZqDIk08UbXtQ4PctoIeB0-a1dmaYwpe8hay0BYcjGFhK6iQsiYrtNW4RLNCW2V5sKGtsmwtsQJaKsvWfBWsbZXvYSu4vPa2nk1mbKsyB0WZeOLXisgKWhw0aVUna44heKlLyEJLcDCFhaugQkqaqtBV4xKtCl1V5aGGtspytcQKaKksV_NVsHZVvYer4PLau3o2WaFnvRcOGOh4GS5ibfQYt75ZTE8f9e5fIA5X0UTfR-Fke8zux_42t31hquNk91u--6G72P1qU_BtmJNhRYcFGZZ0WJJhnw6r0zB_G24chXm-ML-xSQurtLRKK5D2ybRVmDdt0sIqLa3SCqQb5GUKwjc5wuI03CTDLfoGadEo1OnenDbFR6jQqnAB4rQrHNjAaVk4QI2f3WTH8QaI05cboAmkkU0gjnACcaQTiCOe-NmtlscnkEZAgTgSCsQRUSCOjOK0M7wF4rQ0J_EzpzhtjaiDLxHg-wugStDWCGCNoK0RwBpBWyPQFyjaGgGsEVbWgDSyBsSRNSCOrAFxZI2wsgakkTUgjqwBcWQNiCNrBG2NANYI2hoBrBG0NRJYI-2skbQ1Elgjwf-XgDWStkYCayRtjQTWSCtrQBpZA-LIGhBH1oA4skZaWQPSyBoQR9aAOLIGxJE1krZGAmskbY0E1kjaGgWsUXbWKPBkBlijaGsUer5CW6OANYq2RgFrlJU1IA2f79hZA-LwCY-dNcrKGpBG1oA4sgbEkTUgjqxRtDUKWKNoaxSwRtHW-MAaP6c1D6-__B8AAP__bm96zA== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); # EXCEPT ALL and EXCEPT with swapped column orders. query T @@ -953,6 +1033,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8lk9v2koQwO_vU6zmFPQW2bu2-WPpSclLqIpEQ4o5pKo4OHgbkAh210bCifLdK0woMSY7Xkx8g7C_2fHMbzJ-gfj3Alzo3d8Nrvq35OKm742974MGufB6g971mKzJl9HwG1mnz2Q4uumNyP8_SNogvfvr3t2YXA0Gf0-m5Mo7evy5sf-8BgrLMBC3_pOIwf0JDChwoGABBRsoODChEMlwKuI4lJsjLxnQD9bgmhTmy2iVbP48oTANpQD3BZJ5shDgwth_WIiR8AMhDRMoBCLx54vsmnX6fBnJ-ZMvU6DgRf4ydknT2Nw8XCUuuWQweaUQrpK38PuoDymZ-fEsHy87P6EQJ_6jAJe90tPSdDTT5JXS5B-muY-zWoYyEFIEuUiTDYkdOfKsX_145olkGBnsoCPjNBLuO4-AwkL8Si4uWeM_OX-cZZ8-bM_-mSyd0nuhTIQ0mHNYpn8_jG-XqNmxcrwFPZLEbdgMI4ObhwU-er2Tu56VN4uVMMvgTcP6lBHQSLSlneg5h4DVOwSsjiFAir8bgtapQ8DLN5eXaa7VNOxPsVAj0bZ2oue0kNdrIa_DQqT4Owvbp1polW-uVaa5djPbxue3UCPRjnai57TQqtdCqw4LkeLvLOycaqFdvrl2meY6zU9xUCPNrmaa5zTQrtdAuw4DkdLvDOye45X0SPyRiKNwGYtSb5vmpmAieBTbBsThSk7FnQyn2TXbr8OMy94yAhEn21_59kt_uf1pk2B5uF0FZqwS7VSiu2qaadSM68HtKvBBzXRppxLdVdP8kDbf01YONg9hSwnb6m7ZSpgz9dVOlflQw8h8qGFsPhAamQ-ERuajVWU-1DAyH2oYmw-ERuYDoZH5aCst7agl7VSZj24Vw9UwYrgaxgxHaMRwhMY2gM7aLP4n1dmbujS6BLQ2pzaOaM4KWySnKuNq0Zl6jSCms8Ie0VEdoRHXERqTHcMR2zEc072wQ7V0V9OY7moa1R3BMd0RHNO9sEjzurcQ3Qs7RUv3wk7R0l1NY7qraVR3BMd0R3BM98I-1dJdTWO6q2lUdwTHdEdwTPfCVs2_a5tq3Xlhtyh1n7z-8ycAAP___hN5LQ== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); query T EXPLAIN (DISTSQL) (SELECT x FROM xyz ORDER BY y) EXCEPT (SELECT y AS x FROM xyz ORDER BY z) ORDER BY x @@ -1000,6 +1084,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ll9v2jwUh-_fT2Gdq6LXKNhJ-BNpUruWaUisdMBFp4mLlHgFiZLMCRK06nefCEU0hPjEpPVd0-Sxfzl-DicvEP9dgAfd-7v-Ve-WXNz0RuPRz36NXIy6_e71mKzJt-HgB1lvnslgeNMdkq-_yKZGuvfX3bsxuer31U9S8lw7XK6BwjIMxK3_JGLwfgMDChwo2EDBAQouTChEMpyKOA7l9pGXFOgFa_AaFObLaJVs_z2hMA2lAO8FknmyEODB2H9YiKHwAyGtBlAIROLPF-k2683zZSTnT77cAIVR5C9jj9St7c6DVeKRSwaTVwrhKnlb_rDqw4bM_HiWXS99fkIhTvxHAR57pefFdI3G5IUxD-uslqEMhBRBZqXJlsQeOfGu3_14NhLJILLY0YmMN5Hw3lkEFBbiT3JxyWpf5Pxxlv5V-N6Hd7J1Sj8KZSKkxdzjMv1fuL5TomanyvG26IkQt2E9jCzeOC7wye3dzPasvFmshFkWr1v2p7SARtCm4aC8MKiBJmAmmgAp_r4Jmuc2AS9_uLzM4dp1y_kUCzWCtgwH5YVBDVjITViIFH9vYetcC-3yh2uXOVynnk7jj7dQI2jbcFBeGNSAhbYJC5Hi7y1sn2uhU_5wnTKH69Y_xUGNmB2jMXlhTAMGOiYMREq_N7DzEZ-kJ9YfijgKl7Eo9bXZ2BZMBI9idwBxuJJTcSfDabrN7nKQculXRiDiZHeX7y56y92tbcDycKsKzFgl2q1Ed9Q006gZ14NbVeCjmunSbiW6o6b5Md14T9sZuHEM20rYUZ-Wo4Q5U2_tVukPNYz0hxrG-gOhkf5AaKQ_mlX6Qw0j_aGGsf5AaKQ_EBrpj5bS0rZa0naV_uhUMVwNI4arYcxwhEYMR2hsAuiMzfwvqc7c1KXRIaA1ObVxRHOWmyIZVRlXi87UYwQxneXmiI7qCI24jtCY7BiO2I7hmO65Gaqlu5rGdFfTqO4IjumO4JjuuUGa1b2J6J6bKVq652aKlu5qGtNdTaO6IzimO4JjuufmqZbuahrTXU2juiM4pjuCY7rnpmr2W7uh1p3nZotS98nrf_8CAAD__zWpeKA= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); query T EXPLAIN (DISTSQL) (SELECT x FROM xyz ORDER BY y) EXCEPT (SELECT x FROM xyz ORDER BY y, z) ORDER BY x @@ -1023,6 +1111,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8mF9v6jYYxu_3KSJftVpQsB3-RZrUs1OmVWKlAy7ONPUiB7wWiUNYEiRo1e8-EYbSxuR97CbhrhR-8ZMXPz85vLLk3xUL2PDbw-jL3b1zdXs3nU3_HF07V9PhaPh15uyc3ybjP5zd_sUZT26HE-fXv5z9tTP89nX4MKM_5Tov1_nLHXPZOlqo-_CHSljwN-PMZYK5TDKX-cxlHfbosk0czVWSRPHhI68ZcLfYsaDtsuV6s00P_3502TyKFQteWbpMV4oFbBZ-X6mJChcq9trMZQuVhstVtsxu_3KziZc_wnjPXDbdhOskcFreYeXxNg2cG84e31wWbdP88kkaPikW8Df3cxE6tUUQNhFul0m6XM9TjxdmoC2QM9_3znOYPJ_5fB5Cfi5Ep9YQfmmI_DrbdRQvVKwWH66UXaU0pkCzyiN0moqAJpVH6FaI4H4q5e9h8jxV6XjjycKkZvuNCk4m-DIaMZet1D_p1Q2__iVePj1nfxns8Z7N9ppGcapiT2oj-7n0-n2DmZ0bx_8XPRPiPmpFG89vFwd8dvnBh-W5uUW4gUU80fKktcosQnRrDCFsQuQe4Q3KzDhEt0GZ8fpMgmZVJrMaI6BJlcnMLkJlmfFLyAxsr5PMtJGZykyYF1mYFFm2PN_aJhYhejWGEDYh8iKLBm1iHKLXoE1EfVVGsyqzSY0R0KTKbGIXobJNxCVsArbXySbayExtIs2LLE2K7LeyJyE7m1iE6NcYQtiEyIssG7SJcYh-gzaR9VUZzarMJjVGQJMqs4ldhMo2kZewCdheJ5toIzO1iW9eZN-kyJ2WtUssIgxqiyBsIuQl9hs0iXGIQYMm8eurMZpVmUlqjIAmVWYSuwiVTeJfwiRge51Moo3sMz_ZnLn-RCWbaJ0oo19j2oeBqcWTOn4BSbSN5-ohjubZMseX44zL_rFQSXp8Vxxf3K2Pbx0Cvoc5CUsaFkWYv4f9DzC3g7msQgteiR5UoWWPpiVJd6rAHIycpoWoQst2JbpP0z65Tbs03LGARRHuknCPLkiPhME990nY5_TSA5LmgOa0VDiyiqYVGzMAGqkB4MgNCAdyADiyA6flAvQAaOQHgCNBABwZAuGgLlwzzMcti0ZHK6aAa5rgtGR4FxSG1gy6ddozfAAWp00j2gDXVGNVdpqGZadxWHaAo7LTOCq70CxrU3ZAo7IDHJUd4KjsCAc7XtDnVoFOj5pqKFwru6BVI3xwbKZVg26dNo0ARxJBm0b0Aa6pxurMT9Pw0E_j8NQPcHTsp3FYds2yVmWnaVh2Godlp3FYdoCjHU-fZSX42iV9li3gWtkleEQGR2FJqwbcuqRNIztgcdo0EpxKpKYam7IDGpUd4KjsCAdlBzh8yNcsa_WUT9PwMZ_G4XM-jcMHfYCjHU-fZSX63uizbAHXy06rxgdHYZ9WTfHWH99--i8AAP__trkHsA== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x) STORING (y); # EXCEPT ALL and EXCEPT with compatible ORDER BY columns that are not in the final result. query T diff --git a/pkg/sql/opt/exec/execbuilder/testdata/explain b/pkg/sql/opt/exec/execbuilder/testdata/explain index 36dc20079260..5b9945cfccbb 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/explain +++ b/pkg/sql/opt/exec/execbuilder/testdata/explain @@ -780,6 +780,10 @@ vectorized: true estimated row count: 10 (missing stats) table: tc@c spans: /10-/11 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX tc@c; CREATE INDEX ON tc (a) STORING (b); query T EXPLAIN (TYPES) INSERT INTO t VALUES (1, 2) @@ -847,6 +851,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (v); query T EXPLAIN (TYPES) VALUES (1, 2, 3), (4, 5, 6) @@ -904,6 +912,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (v); query T EXPLAIN (TYPES) UPDATE t SET v = k + 1 WHERE v > 123 @@ -935,6 +947,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (v); query T EXPLAIN (TYPES) VALUES (1) UNION VALUES (2) @@ -985,6 +1001,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (v); query T EXPLAIN (TYPES) SELECT v FROM t LIMIT 1 @@ -1018,6 +1038,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: tt@tt_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX tt@a; CREATE INDEX ON tt (x) STORING (y); # TODO(radu): we don't support placeholders with no values. #query TTTTT @@ -1594,7 +1618,7 @@ regions: query T EXPLAIN (OPT, MEMO) SELECT * FROM tc JOIN t ON k=a ---- -memo (optimized, ~14KB, required=[presentation: info:10]) +memo (optimized, ~10KB, required=[presentation: info:10]) ├── G1: (explain G2 [presentation: a:1,b:2,k:6,v:7]) │ └── [presentation: info:10] │ ├── best: (explain G2="[presentation: a:1,b:2,k:6,v:7]" [presentation: a:1,b:2,k:6,v:7]) @@ -1653,7 +1677,7 @@ TABLE t ├── tableoid oid [hidden] [system] └── PRIMARY INDEX t_pkey └── k int not null -memo (optimized, ~14KB, required=[presentation: info:10]) +memo (optimized, ~10KB, required=[presentation: info:10]) ├── G1: (explain G2 [presentation: a:1,b:2,k:6,v:7]) │ └── [presentation: info:10] │ ├── best: (explain G2="[presentation: a:1,b:2,k:6,v:7]" [presentation: a:1,b:2,k:6,v:7]) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/fk b/pkg/sql/opt/exec/execbuilder/testdata/fk index 73e500eb9129..f99cc3ab7e3f 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/fk +++ b/pkg/sql/opt/exec/execbuilder/testdata/fk @@ -640,6 +640,10 @@ vectorized: true missing stats table: grandchild@grandchild_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON grandchild (c); # This update shouldn't emit checks for c, since it's unchanged. query T @@ -781,6 +785,10 @@ vectorized: true missing stats table: grandchild@grandchild_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON grandchild (c); # Multiple grandchild tables statement ok @@ -914,6 +922,10 @@ vectorized: true missing stats table: self@self_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON self (y); # Tests for the insert fast path. statement ok diff --git a/pkg/sql/opt/exec/execbuilder/testdata/insert b/pkg/sql/opt/exec/execbuilder/testdata/insert index 106ca136bcec..304b05a5dd9e 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/insert +++ b/pkg/sql/opt/exec/execbuilder/testdata/insert @@ -333,6 +333,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: select_t@select_t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON select_t (v) STORING (x); # Check that INSERT supports LIMIT (MySQL extension) query T diff --git a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial index 3749f680c517..e02d826ec770 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial +++ b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial @@ -133,6 +133,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: ltable@ltable_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON rtable (rk1) STORING (geom); query T EXPLAIN (VERBOSE) @@ -184,6 +188,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: ltable@ltable_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON rtable (rk1) STORING (geom); query T EXPLAIN (VERBOSE) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/join b/pkg/sql/opt/exec/execbuilder/testdata/join index c7a95bb37df0..8a4668f1aba9 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/join +++ b/pkg/sql/opt/exec/execbuilder/testdata/join @@ -26,6 +26,12 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON onecolumn (x); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (x) STORING (y); query T EXPLAIN SELECT * FROM twocolumn AS a JOIN twocolumn AS b ON a.x = b.y @@ -45,6 +51,12 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON twocolumn (x) STORING (y); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (y) STORING (x); query T EXPLAIN SELECT * FROM twocolumn AS a JOIN twocolumn AS b ON a.x = 44 @@ -66,6 +78,10 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON twocolumn (x) STORING (y); query T EXPLAIN SELECT * FROM onecolumn AS a JOIN twocolumn AS b ON ((a.x)) = ((b.y)) @@ -85,6 +101,12 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON onecolumn (x); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (y) STORING (x); query T EXPLAIN SELECT * FROM onecolumn JOIN twocolumn ON onecolumn.x = twocolumn.y @@ -104,6 +126,12 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON onecolumn (x); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (y) STORING (x); query T EXPLAIN SELECT * FROM @@ -147,6 +175,12 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON onecolumn (x); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (x) STORING (y); # The following queries verify that only the necessary columns are scanned. query T @@ -197,6 +231,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON twocolumn (x); query T EXPLAIN (VERBOSE) SELECT b.y FROM (twocolumn AS a JOIN twocolumn AS b ON a.x = b.x) @@ -224,6 +262,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON twocolumn (x); query T EXPLAIN (VERBOSE) SELECT a.x FROM (twocolumn AS a JOIN twocolumn AS b ON a.x < b.y) @@ -293,6 +335,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON onecolumn (x); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (x) STORING (y); # Ensure that the ordering information for the result of joins is sane. (#12037) query T @@ -598,6 +646,10 @@ vectorized: true missing stats table: square@square_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON pairs (b) STORING (a); # The filter expression becomes an ON predicate. query T @@ -793,6 +845,12 @@ vectorized: true estimated row count: 333 (missing stats) table: square@square_pkey spans: -/6 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON pairs (b) STORING (a); +2. type: index creation + SQL command: CREATE INDEX ON square (sq); query T EXPLAIN (VERBOSE) @@ -830,6 +888,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: pairs@pairs_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON pairs (a) STORING (b); # The simpler plan for an inner join, to compare. query T @@ -863,6 +925,10 @@ vectorized: true table: square@square_pkey spans: /2-/6 parallel +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON pairs (b) STORING (a); statement ok @@ -897,6 +963,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t2@t2_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON t1 (x, y); +2. type: index creation + SQL command: CREATE INDEX ON t2 (x, y); # Tests for merge join ordering information. statement ok @@ -935,6 +1007,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: pkbc@pkbc_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON pkba (a) STORING (c, d); +2. type: index creation + SQL command: CREATE INDEX ON pkbc (a) STORING (d); query T EXPLAIN (VERBOSE) SELECT * FROM pkBA NATURAL JOIN pkBAD @@ -967,6 +1045,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: pkba@pkba_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON pkba (a) STORING (c, d); +2. type: index creation + SQL command: CREATE INDEX ON pkbad (a, b, c, d); query T EXPLAIN (VERBOSE) SELECT * FROM pkBAC AS l JOIN pkBAC AS r USING(a, b, c) @@ -1060,6 +1144,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: str2@str2_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON str1 (s); +2. type: index creation + SQL command: CREATE INDEX ON str2 (s); query T EXPLAIN (VERBOSE) SELECT s, str1.s, str2.s FROM str1 LEFT OUTER JOIN str2 USING(s) @@ -1086,6 +1176,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: str2@str2_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON str1 (s); +2. type: index creation + SQL command: CREATE INDEX ON str2 (s); query T EXPLAIN (VERBOSE) SELECT s, str1.s, str2.s FROM str1 RIGHT OUTER JOIN str2 USING(s) @@ -1116,6 +1212,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: str1@str1_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON str1 (s); +2. type: index creation + SQL command: CREATE INDEX ON str2 (s); query T EXPLAIN (VERBOSE) SELECT s, str1.s, str2.s FROM str1 FULL OUTER JOIN str2 USING(s) @@ -1146,6 +1248,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: str2@str2_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON str1 (s); +2. type: index creation + SQL command: CREATE INDEX ON str2 (s); # Verify that we resolve the merged column a to str2.a but use IFNULL for # column s which is a collated string. @@ -1874,6 +1982,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: bar@bar_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON bar (a) STORING (b, c, d); +2. type: index creation + SQL command: CREATE INDEX ON foo (a) STORING (b, c, d); # Only a and c can be equality columns. query T @@ -1952,6 +2066,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: bar@bar_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON bar (a) STORING (b, c, d); +2. type: index creation + SQL command: CREATE INDEX ON foo (a) STORING (b, c, d); query T EXPLAIN (VERBOSE) SELECT * FROM foo, bar WHERE foo.b = bar.b @@ -2000,6 +2120,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: bar@bar_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON bar (a) STORING (b, c, d); +2. type: index creation + SQL command: CREATE INDEX ON foo (a) STORING (b, c, d); # Only a and c can be equality columns. query T @@ -2051,6 +2177,10 @@ vectorized: true missing stats table: zigzag@b_idx spans: [/5 - /5] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON zigzag (b, c); statement ok SET enable_zigzag_join = false @@ -2071,6 +2201,10 @@ vectorized: true missing stats table: zigzag@b_idx spans: [/5 - /5] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON zigzag (b, c); # Enable zigzag joins. statement ok @@ -2091,6 +2225,12 @@ vectorized: true right table: zigzag@c_idx right columns: (c) right fixed values: 1 column +· +index recommendations: 2 +1. type: index replacement + SQL commands: DROP INDEX zigzag@b_idx; CREATE INDEX ON zigzag (b) STORING (c); +2. type: index replacement + SQL commands: DROP INDEX zigzag@c_idx; CREATE INDEX ON zigzag (c) STORING (b); # Zigzag join nested inside a lookup. @@ -2113,6 +2253,12 @@ vectorized: true right table: zigzag@c_idx right columns: (c) right fixed values: 1 column +· +index recommendations: 2 +1. type: index replacement + SQL commands: DROP INDEX zigzag@b_idx; CREATE INDEX ON zigzag (b) STORING (c, d); +2. type: index replacement + SQL commands: DROP INDEX zigzag@c_idx; CREATE INDEX ON zigzag (c) STORING (b, d); # Zigzag join nested inside a lookup, with an on condition on lookup join. query T @@ -2135,6 +2281,12 @@ vectorized: true right table: zigzag@c_idx right columns: (c) right fixed values: 1 column +· +index recommendations: 2 +1. type: index replacement + SQL commands: DROP INDEX zigzag@b_idx; CREATE INDEX ON zigzag (b) STORING (c, d); +2. type: index replacement + SQL commands: DROP INDEX zigzag@c_idx; CREATE INDEX ON zigzag (c) STORING (b, d); # Regression test for part of #34695. @@ -2166,6 +2318,12 @@ vectorized: true missing stats table: zigzag2@a_b_idx spans: [/1/2 - /1/2] +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON zigzag2 (a) STORING (b, c, d); +2. type: index creation + SQL command: CREATE INDEX ON zigzag2 (b) STORING (a, c, d); # Test that we can force a merge join. query T @@ -2192,6 +2350,12 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON onecolumn (x); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (x) STORING (y); # Test that we can force a merge join using the NATURAL syntax. query T @@ -2218,6 +2382,12 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON onecolumn (x); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (x) STORING (y); # Test that we can force a merge join using the CROSS syntax. query T @@ -2244,6 +2414,12 @@ vectorized: true missing stats table: twocolumn@twocolumn_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON onecolumn (x); +2. type: index creation + SQL command: CREATE INDEX ON twocolumn (x) STORING (y); statement error LOOKUP can only be used with INNER or LEFT joins EXPLAIN SELECT * FROM onecolumn RIGHT LOOKUP JOIN twocolumn USING(x) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/limit b/pkg/sql/opt/exec/execbuilder/testdata/limit index 37e0f1541769..31a84f451970 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/limit +++ b/pkg/sql/opt/exec/execbuilder/testdata/limit @@ -34,6 +34,10 @@ vectorized: true estimated row count: 30 (missing stats) table: t@t_v_idx spans: /5-/8 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t@t_v_idx; CREATE INDEX ON t (v) STORING (w); # This kind of query can be used to work around memory usage limits. We need to # choose the "hard" limit of 100 over the "soft" limit of 25 (with the hard @@ -68,6 +72,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (w); query T EXPLAIN (VERBOSE) SELECT k, v FROM t ORDER BY k LIMIT 5 @@ -252,6 +260,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t@t_v_idx; CREATE INDEX ON t (v) STORING (w); query T EXPLAIN (VERBOSE) SELECT k, w FROM t WHERE v >= 1 AND v <= 100 ORDER BY v LIMIT 10 @@ -276,6 +288,10 @@ vectorized: true table: t@t_v_idx spans: /1-/101 limit: 10 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t@t_v_idx; CREATE INDEX ON t (v) STORING (w); query T EXPLAIN (VERBOSE) SELECT k, w FROM (SELECT * FROM t WHERE v >= 1 AND v <= 100 ORDER BY k LIMIT 10) ORDER BY v @@ -471,6 +487,10 @@ vectorized: true table: user_checklist_items@userchecklistitems_tenantid_userid_dateshouldbecompleted_locationname_orderitem spans: [/7/'a2a0dd49-23cf-4cf2-b823-61701c416e60'/'01603523-c6f0-4e12-a43f-524c76b0fa8f'/'2020-10-01' - /7/'a2a0dd49-23cf-4cf2-b823-61701c416e60'/'01603523-c6f0-4e12-a43f-524c76b0fa8f'] limit: 5 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON user_checklist_items (date_should_be_completed); query T EXPLAIN (VERBOSE) SELECT * FROM t ORDER BY v, w LIMIT 5 @@ -490,6 +510,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (v, w); @@ -530,3 +554,9 @@ vectorized: true estimated row count: 100 - 1,001 (100% of the table; stats collected ago) table: a@a_i_j_idx spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON a (i) STORING (j); +2. type: index creation + SQL command: CREATE INDEX ON b (k) STORING (s); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join index 45057ee9ea6c..11c9650d89a7 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join @@ -210,6 +210,10 @@ vectorized: true estimated row count: 100,000 (100% of the table; stats collected ago) table: data@data_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (c); query T EXPLAIN (DISTSQL) @@ -237,6 +241,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJzElV-P0kwYxe_fT_Hkudp9M007_bMLk5iUKBvZYFkBo4lyUelkrXY7ddomGsJ3N22VpQRmKhC8nOmcnvPM7ySzwvx7ggyHHx7Gg1EAV69Gs_ns7fgaZsPx8OUc_oe76eQNXLWXUViE8P71cDqEJbwAeg2DGSQQDObvpoMx3E-qXykkn0rLcjhYtU4iwVREPAifeI7sI1IkaCNBBwm6SNDDBcFMiiXPcyGrI6taMIp-ILMIxmlWFtX2guBSSI5shUVcJBwZzsPPCZ_yMOLStJBgxIswTmqbKpGfyfgplD-R4CwL05yBYVII0wgoiOILl7hYExRl8eyQF-EjR0bXpHuKuzgpuOTS9NoRmn0GvlPdImNsFMx7By3tv7G8F3H6e26qHnwsxLcyg68iTkGkDHxKfJv4DvGry58E4N9ugP2JSHBSFu2jh1I7B1M_hy1TISMuedQKuljvmSsQhshM6u2c3O_ttrxp96rQLlUxqWHaR5RFk2NTlpvzlUVjuV0W9egXLYvdHZjdCZhtmM4RwDQ5NsBuzwdMY7kNTD36RYE53YE5nYA5hukeAUyTYwOsdz5gGsttYOrRLwrM7Q7M7QTMNUzvCGCaHBtg_fMB01huA1OP_s_ezz2ppzzPRJrzTq-jVb2vPHrkzWOci1Iu-YMUy9qmWU5qXb0R8bxovtJmMUqbT1XAbTFVim212FaKnZaY7ooddewbtbWrVHtqsacUa5xvThn6VinuqZ17SnFfLe6fEptqOqYrmbplVFMzelLPqKZorsZc3TSqqRpVd203-2L9368AAAD__3AfaVA= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON data (c); statement ok CREATE TABLE books (title STRING, edition INT, shelf INT, PRIMARY KEY (title, edition)) @@ -345,6 +353,10 @@ vectorized: true estimated row count: 100 (100% of the table; stats collected ago) table: authors@authors_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON authors (book) STORING (name); # Verify data placement. query TTTI colnames @@ -384,6 +396,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyck1Fv2jAQx9_3KW73lEheIU7opEiVggpTmRh0gLRJEw8JuULWYGe2I21CfPcpDl0bBOnoW86-3__-d77sUP_KMcTh9_txfzQBZzCaL-Zfxy7Mh-Ph7QKqeDS5XUBcmo1U-krEW4JPs-kXSKR81NCfQ-KxOuA24uwpGb7dDWdDcJzEuzKZyQluIOH1pwv9yQCcJ9mKr24Pie7hOvGu9IbyB3hvSfvtIkMhU5rEW9IY_kAPlwwLJVektVTV0c4mjNLfGHYZZqIoTXW8ZLiSijDcoa2CIS7iJKcZxSmpThcZpmTiLLeytqWoUNk2Vn-Q4byIhQ7hAzKcliaEyGORj8s9Q1ma5wraxGvC0Nuzt7nwmi4OA3rFBz_rg5_18Vy-FFKlpChtlF5W5GspJ5q5i_Xms8wEqQ5v9pLTg3Eiz71R2XpjnIi7jR5Y5LMoONuJf8lEKwOHgfonnpW_mOdYyseygJ8yEyBFCFFQuZpAxKutiz7-83j-sYNLrA0ybTKxMp2gaSzyzur33qTf-2_960v0Z6QLKTQdL8tJ5W61IZSuqd44LUu1onslV7ZMHU4tZw9S0qa-5XUwEvbK_k0vYe8CmB_DvBX2G3D3GPZb4aAdDlrhXjvca4Wvj-Dl_t3fAAAA___-ZuVx +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON authors (book) STORING (name); query T EXPLAIN (VERBOSE) SELECT a.name FROM authors AS a JOIN books2 AS b2 ON a.book = b2.title ORDER BY a.name @@ -414,6 +430,10 @@ vectorized: true estimated row count: 100 (100% of the table; stats collected ago) table: authors@authors_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON authors (name) STORING (book); # Cross joins should not be planned as lookup joins. query T @@ -458,6 +478,12 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkVFr1EAQx9_9FMM8qUzbS05FFgorGjHlTGruQEHysL0d6trrTtzdgHLcd5ckPWyFHr23zH_y-8-PZIvx1wYVFt8uF-_KCp5_KJer5ZfFC1gWi-L9Cl7Cx6b-DKZPPyREKKuqaOCiLiu4ErmJOdT7p1O2LjnxcA4ZfP1UNMV-kVzaMJzvS06HGAm9WK7MLUdU3zHDlrALsuYYJQzRdnyhtL9RzQid7_o0xC3hWgKj2uLYiwpX5mrDDRvL4WyGhJaTcZux9u6k7oK7NeEPEi4746OCEyRs2FsOCjKlVFmt3hLojEDn2O4IpU__LsZkrhlVtqOnW12I83dS2UOp6bPcc1qI3PQd_BTnQbwCPSc9MHWfFOichvkV6dek3zzqlh_jVsmJdGf5A63HiufHFDccO_GRn9Q827WEbK95-t1R-rDmyyDr8cw01iM3BpZjmrbZNJR-Wg2C9-HsIJwfhvOD8Pw_uN09-xsAAP__HEsNaA== +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON authors (book) STORING (name); +2. type: index creation + SQL command: CREATE INDEX ON books2 (edition) STORING (shelf); #################################### # LOOKUP JOIN ON SECONDARY INDEX # @@ -555,6 +581,10 @@ vectorized: true estimated row count: 100 (100% of the table; stats collected ago) table: small@small_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX large@bc; CREATE INDEX ON large (b) STORING (c, d); ############################ # LEFT OUTER LOOKUP JOIN # @@ -680,6 +710,10 @@ vectorized: true estimated row count: 100 (100% of the table; stats collected ago) table: small@small_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX large@bc; CREATE INDEX ON large (b) STORING (c, d); # Left join with ON filter on covering index query T @@ -704,6 +738,10 @@ vectorized: true estimated row count: 100 (100% of the table; stats collected ago) table: small@small_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON large (b, c); # Left join with ON filter on non-covering index # TODO(radu): this doesn't use lookup join yet, the current rules don't cover @@ -739,6 +777,10 @@ vectorized: true estimated row count: 100 (100% of the table; stats collected ago) table: small@small_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON large (b, d); ########################################################### # LOOKUP JOINS ON IMPLICIT INDEX KEY COLUMNS # @@ -780,6 +822,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (e) STORING (a, d); # Test unique version of same index. (Lookup join should not use column a.) statement ok @@ -816,6 +862,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (e) STORING (a, d); # Test index with first primary key column explicit and the rest implicit. statement ok @@ -850,6 +900,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON t (e) STORING (a, b, d); +2. type: index creation + SQL command: CREATE INDEX ON u (d); # Test index with middle primary key column explicit and the rest implicit. statement ok @@ -884,6 +940,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON t (e) STORING (a, b, d); +2. type: index creation + SQL command: CREATE INDEX ON u (d); # Test index with last primary key column explicit and the rest implicit. statement ok @@ -919,6 +981,12 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON t (e) STORING (a, d); +2. type: index creation + SQL command: CREATE INDEX ON u (d); query T EXPLAIN (VERBOSE) SELECT * FROM def JOIN abc ON a=f ORDER BY a @@ -1766,6 +1834,14 @@ vectorized: true estimated row count: 25 (100% of the table; stats collected ago) table: nation@nation_pkey spans: FULL SCAN +· +index recommendations: 3 +1. type: index replacement + SQL commands: DROP INDEX lineitem@l_sk; CREATE INDEX ON lineitem (l_suppkey) STORING (l_commitdate, l_receiptdate); +2. type: index creation + SQL command: CREATE INDEX ON nation (n_name); +3. type: index replacement + SQL commands: DROP INDEX supplier@s_nk; CREATE INDEX ON supplier (s_nationkey) STORING (s_name); # Regression test for #50964. statement ok @@ -1814,6 +1890,12 @@ vectorized: true estimated row count: 10 (missing stats) table: tab4@tab4_col3_col4_key spans: /NULL- +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON tab4 (col3) STORING (col0); +2. type: index creation + SQL command: CREATE INDEX ON tab4 (col4) STORING (col3); ########################################################### # LOOKUP JOINS WITH LOOKUP EXPRESSIONS # @@ -1889,6 +1971,10 @@ vectorized: true size: 2 columns, 3 rows · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUUmFr2zAQ_b5fcdyXyONoo2RpgyCgbHWHi2d3sVMGIxgTi85rZnmWjN2F_Pdhu13TQcf67d679-7EO-3R_NyhQPfLtb_0AmAXXhRHn30HItd3P8TwFi5X4SdgN0t_7UbAOAEfOwRsQjDpiylBsPZ9x4FlBDWwhqB1wHcvY7gKvQB2Wt_VZaLasuoUFsIAWH3SwALsSePAMrjocNvj1kHCQmcqSH8og-IrctwQlpXeKmN01VH7XuBlLYoxYV6Ute3oDeFWVwrFHm1udwoF3qS7WpnTMRJmyqb5bpjI4T2wKWy_1cWdcXBzINS1fRpjbHqrUIwP9P-rrnRerFSaqeqUP18X35dKDHmE69hd9akg4VEu8qhOqqRN7pNfSZPkWYuEft-D7zovQBcCGGNMTmAB8uwhPMk7NHMe4RS6S45UauxICBHFKy_4SDBq1DHh_NGf93o-FkJ4QTzvDvtQPmnmsIDZI4uEYW0FSE5yQnJK8h3JGckzkuck5y8myl-T6EqZUhdGPUvz5VttCFV2q4YPYnRdbdV1pbf9mgGGva8nMmXs0OUD8Iqh1T3w2Mz_aZ78Zd4c3vwOAAD___N7_WA= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON lookup_expr (w) STORING (x, y, z); query T EXPLAIN (DISTSQL) SELECT * FROM (VALUES (1, 10), (2, 20), (3, NULL)) AS u(w, x) WHERE NOT EXISTS ( @@ -1906,3 +1992,7 @@ vectorized: true size: 2 columns, 3 rows · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyUUlFr20wQfP9-xbIvvvs4Ep9N2nBgkNsorYIqp5aSBooRQlpSNapO1Z2QUuP_XiQ5jV1Iad92Zndmj9nbovleoEL37tpfegGwCy-Mwo8-h9D13bcR_A-X69UHYLdL_8YNgUkBcsoFsJmA2VDMBQQ3vs85LENogLUCOg6f3rtrF4JVBO5dbwns2LDQ-qGpYuqqutfZvYA1Jy0swJ60HJbBRY-7AXeco8BSZxQk38ig-owSNwKrWqdkjK57ajsMeFmHaiowL6vG9vRGYKprQrVFm9uCUOFtUjRkTqcoMCOb5MXoKOENsDmkX5rywXDc7ATqxj7bGJvcE6rpTvz9qiudl2tKMqpP5fG66LEiBb57GcEyiDy4WnkBCjyIxjmo4zru4sf4R9zGedahQH_owVedl6BLBYwx5sxgAc6rfXiO7NEZf4Jz6E88ocTYiVIqjNZe8E7ApKVDgv-afz3My6lSygui8_7i-_J55hwWcPbEosBVYxU4UjizF-OT_xLfmkylS0NH0b18mI1Ayu5p_A1GN3VK17VOhzUjXA26gcjI2LErR-CVY6t_4KFY_lE8-0282f33MwAA__9ovQAB +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON lookup_expr (w, x); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join_spans b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join_spans index 32e95ecc5074..098df69675d7 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join_spans +++ b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join_spans @@ -135,6 +135,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -165,6 +169,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -197,6 +205,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -227,6 +239,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -254,6 +270,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -280,6 +300,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -312,6 +336,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -342,6 +370,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -374,6 +406,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -404,6 +440,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -436,6 +476,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); query T EXPLAIN @@ -466,6 +510,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); # Test lookup conditions w/ a left join. query T @@ -495,6 +543,10 @@ vectorized: true estimated row count: 10 (100% of the table; stats collected ago) table: metrics@metrics_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON metric_values ("time") STORING (nullable, value); # Test lookup conditions w/ a semi join. query T @@ -516,6 +568,10 @@ vectorized: true estimated row count: 10 (100% of the table; stats collected ago) table: metrics@metrics_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON metric_values ("time"); # Test NULL values in pre-join where conditions. query T @@ -556,6 +612,12 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON metric_values (nullable) STORING (value); +2. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); # Test NULL values in bounded lookup span. query T @@ -597,6 +659,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON metric_values (nullable) STORING (value); # Test NULL values in > unbounded lookup span. query T @@ -638,6 +704,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON metric_values (nullable) STORING (value); # Test NULL values in >= unbounded lookup span. query T @@ -679,6 +749,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON metric_values (nullable) STORING (value); # Test NULL values in < unbounded lookup span. @@ -721,6 +795,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON metric_values (nullable) STORING (value); # Test NULL values in <= unbounded lookup span. query T @@ -762,6 +840,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON metric_values (nullable) STORING (value); # Test NULL values in WHERE equality conditions. query T @@ -802,6 +884,12 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON metric_values (nullable) STORING (value); +2. type: index replacement + SQL commands: DROP INDEX metrics@name_index; CREATE INDEX ON metrics (name) STORING (nullable); # Test NULL values in simple equality condition. @@ -847,6 +935,10 @@ vectorized: true estimated row count: 1 (10% of the table; stats collected ago) table: metrics@name_index spans: [/'cpu' - /'cpu'] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON metric_values (nullable) STORING (value); # Regression test for issue #68200. This ensures that we properly construct the diff --git a/pkg/sql/opt/exec/execbuilder/testdata/materialized_view b/pkg/sql/opt/exec/execbuilder/testdata/materialized_view index 3e700ab63d70..8fecffb97a13 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/materialized_view +++ b/pkg/sql/opt/exec/execbuilder/testdata/materialized_view @@ -38,3 +38,7 @@ vectorized: true missing stats table: v@i spans: [/3 - /3] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX v@i; CREATE INDEX ON v (y) STORING (x); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/orderby b/pkg/sql/opt/exec/execbuilder/testdata/orderby index fbf0f40a9ad3..42ae0a4ea3c1 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/orderby +++ b/pkg/sql/opt/exec/execbuilder/testdata/orderby @@ -21,6 +21,10 @@ vectorized: true missing stats table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); query T EXPLAIN SELECT a, b FROM t ORDER BY b DESC @@ -35,6 +39,10 @@ vectorized: true missing stats table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); # TODO(radu): Should set "strategy top 2" on sort node query T @@ -51,6 +59,10 @@ vectorized: true missing stats table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); query T EXPLAIN (VERBOSE) SELECT DISTINCT c, b FROM t ORDER BY b LIMIT 2 @@ -75,6 +87,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (c); query T EXPLAIN SELECT b FROM t ORDER BY a DESC @@ -139,6 +155,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b, a) STORING (c); query T EXPLAIN (VERBOSE) SELECT * FROM t ORDER BY (b, a), c @@ -157,6 +177,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b, a) STORING (c); query T EXPLAIN (VERBOSE) SELECT * FROM t ORDER BY b, (a, c) @@ -175,6 +199,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b, a) STORING (c); query T EXPLAIN (VERBOSE) SELECT * FROM t ORDER BY (b, (a, c)) @@ -193,6 +221,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b, a) STORING (c); # Check that sort is skipped if the ORDER BY clause is constant. query T @@ -334,6 +366,10 @@ vectorized: true missing stats table: abc@ba spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (b, a, c); # We use the WHERE condition to force the use of the index. query T @@ -353,6 +389,10 @@ vectorized: true missing stats table: abc@ba spans: [/11 - /14] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (b, a, d); # An inequality should not be enough to force the use of the index. query T @@ -371,6 +411,10 @@ vectorized: true missing stats table: abc@abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (b, a, d); query III SELECT a, b, c FROM abc WHERE b > 4 ORDER BY b, a, d @@ -406,6 +450,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: abc@abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (b, a, c) STORING (d); query T EXPLAIN SELECT a, b FROM abc ORDER BY b, c @@ -518,6 +566,10 @@ vectorized: true missing stats table: abc@bc spans: [/2 - /2] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (b); query T EXPLAIN SELECT c FROM abc WHERE b = 2 ORDER BY c DESC @@ -529,6 +581,10 @@ vectorized: true missing stats table: abc@bc spans: [/2 - /2] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (b); # Verify that the ordering of the primary index is still used for the outer sort. query T @@ -564,6 +620,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: bar@i_bar spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON bar (baz, id); statement ok CREATE TABLE abcd ( @@ -809,6 +869,10 @@ vectorized: true estimated row count: 10 (missing stats) table: uvwxyz@ywxz spans: /1-/2 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uvwxyz (y) STORING (w, x); statement ok @@ -874,6 +938,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: foo@foo_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON foo (a) STORING (b); query T EXPLAIN (VERBOSE) SELECT b, a FROM foo ORDER BY @2 @@ -903,6 +971,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: foo@foo_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON foo (b) STORING (a); # ------------------------------------------------------------------------------ # Check star expansion in ORDER BY. @@ -927,6 +999,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: a@a_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON a (x, y); query T EXPLAIN (VERBOSE) SELECT * FROM a ORDER BY (a.*) @@ -945,6 +1021,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: a@a_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON a (x, y); # ------------------------------------------------------------------------------ # ORDER BY INDEX test cases. @@ -1022,6 +1102,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v, k); query T EXPLAIN (VERBOSE) SELECT k FROM kv ORDER BY INDEX kv@foo @@ -1038,6 +1122,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v, k DESC); query T EXPLAIN (VERBOSE) SELECT k FROM kv ORDER BY INDEX kv@foo ASC @@ -1054,6 +1142,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v, k DESC); query T EXPLAIN (VERBOSE) SELECT k FROM kv ORDER BY INDEX kv@foo DESC @@ -1070,6 +1162,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v, k DESC); query T EXPLAIN (VERBOSE) SELECT k FROM kv ORDER BY INDEX kv@foo, k @@ -1086,6 +1182,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@foo spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v, k DESC); # Check the syntax can be used with joins. # @@ -1192,6 +1292,10 @@ vectorized: true estimated row count: 10 (missing stats) table: xyz@xyz_z_y_idx spans: /1/!NULL-/2 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (z, x, y); # ------------------------------------------------------------------------------ # NULLS FIRST, NULLS LAST test cases. @@ -1215,6 +1319,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); query T EXPLAIN (VERBOSE) SELECT a, b FROM t ORDER BY b NULLS LAST @@ -1289,6 +1397,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); query T EXPLAIN (VERBOSE) SELECT a, b FROM t ORDER BY b DESC NULLS FIRST, c NULLS LAST diff --git a/pkg/sql/opt/exec/execbuilder/testdata/partial_index b/pkg/sql/opt/exec/execbuilder/testdata/partial_index index 771b19e78cb9..2ae599f8f8ec 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/partial_index +++ b/pkg/sql/opt/exec/execbuilder/testdata/partial_index @@ -77,6 +77,10 @@ vectorized: true missing stats table: inv@i (partial index) spans: 1 span +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON inv (c) STORING (b); query T EXPLAIN SELECT * FROM inv@i WHERE b @> '{"x": "y"}' AND c IN ('foo', 'bar') @@ -171,3 +175,7 @@ vectorized: true missing stats table: t70116@a_idx (partial index) spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t70116 (b); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/scalar b/pkg/sql/opt/exec/execbuilder/testdata/scalar index 21f9b601dcb3..d9ae823aacca 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/scalar +++ b/pkg/sql/opt/exec/execbuilder/testdata/scalar @@ -876,6 +876,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (a) STORING (b, d); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE a NOT BETWEEN b AND d @@ -897,6 +901,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (a) STORING (b, d); query T EXPLAIN (VERBOSE) SELECT a BETWEEN SYMMETRIC b AND d AS r FROM t @@ -1173,6 +1181,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (a); # Regression test for #47327. The span should have an end value of -1. statement ok diff --git a/pkg/sql/opt/exec/execbuilder/testdata/secondary_index_column_families_nonmetamorphic b/pkg/sql/opt/exec/execbuilder/testdata/secondary_index_column_families_nonmetamorphic index cf4ecdbcbd01..38c0324f2493 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/secondary_index_column_families_nonmetamorphic +++ b/pkg/sql/opt/exec/execbuilder/testdata/secondary_index_column_families_nonmetamorphic @@ -265,6 +265,10 @@ vectorized: true missing stats table: t@i spans: [/2.01/3.001 - /2.01/3.001] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (y) STORING (z, v); # Ensure that we always have a k/v in family 0. statement ok diff --git a/pkg/sql/opt/exec/execbuilder/testdata/select b/pkg/sql/opt/exec/execbuilder/testdata/select index ad26adeb6fe4..5cab9a3a3354 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/select +++ b/pkg/sql/opt/exec/execbuilder/testdata/select @@ -343,6 +343,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: a@a_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON a (y); query T EXPLAIN (VERBOSE) SELECT * FROM a WHERE x > 1 AND x < 3 @@ -698,6 +702,10 @@ vectorized: true estimated row count: 333 (missing stats) table: c@str spans: -/"moo"/PrefixEnd +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON c (str); statement ok DROP TABLE c @@ -1370,6 +1378,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: abcd@abcd_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (b) STORING (c); query T @@ -1509,6 +1521,10 @@ vectorized: true table: xyz@xyz_x_y_z_idx spans: LIMITED SCAN limit: 10 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON xyz (x, z) STORING (y); # ------------------------------------------------------ # Verify that multi-span point lookups are parallelized. @@ -1621,6 +1637,10 @@ vectorized: true missing stats table: a@p spans: [/5.000000000000001 - /9.999999999999998] [/20.000000000000004 - /39.99999999999999] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX a@p; CREATE INDEX ON a (price) STORING (item); query T EXPLAIN SELECT * FROM b WHERE (a = 10 AND b = 10) OR (a = 20 AND b = 20) @@ -1716,6 +1736,10 @@ vectorized: true missing stats table: b@b_d_key spans: [/10 - /10] [/1 - /NULL) +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON b (d); statement ok CREATE UNIQUE INDEX ON b(c, d) @@ -1813,6 +1837,12 @@ vectorized: true missing stats table: s@s_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON e (y) STORING (z); +2. type: index creation + SQL command: CREATE INDEX ON s (y) STORING (z); # Check that we have a sane row count estimate when there are a lot of null # values. @@ -1862,6 +1892,10 @@ vectorized: true estimated row count: 11,110,000 (100% of the table; stats collected ago) table: nulls@nulls_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON nulls (x) STORING (y); # Test resolution of @primary index hint. statement ok diff --git a/pkg/sql/opt/exec/execbuilder/testdata/select_for_update b/pkg/sql/opt/exec/execbuilder/testdata/select_for_update index 5e76cde74b09..0303e3434147 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/select_for_update +++ b/pkg/sql/opt/exec/execbuilder/testdata/select_for_update @@ -729,6 +729,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); query T EXPLAIN (VERBOSE) SELECT * FROM t WHERE a IN (SELECT b FROM t FOR UPDATE) @@ -758,6 +762,10 @@ vectorized: true table: t@t_pkey spans: FULL SCAN locking strength: for update +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); query T EXPLAIN (VERBOSE) SELECT * FROM t WHERE a IN (SELECT b FROM t) FOR UPDATE OF t @@ -786,6 +794,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); query T EXPLAIN (VERBOSE) SELECT * FROM t WHERE a IN (SELECT b FROM t FOR UPDATE OF t) @@ -815,6 +827,10 @@ vectorized: true table: t@t_pkey spans: FULL SCAN locking strength: for update +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b); # ------------------------------------------------------------------------------ # Tests with common-table expressions. diff --git a/pkg/sql/opt/exec/execbuilder/testdata/select_index b/pkg/sql/opt/exec/execbuilder/testdata/select_index index b3e5492ff6be..b7bf75e24f41 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/select_index +++ b/pkg/sql/opt/exec/execbuilder/testdata/select_index @@ -231,6 +231,10 @@ vectorized: true estimated row count: 10 (missing stats) table: t@bc spans: /"3"-/"3"/PrefixEnd +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (c, d); statement ok TRUNCATE TABLE t @@ -500,6 +504,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (c); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE c < 1 AND b < 5 @@ -521,6 +529,10 @@ vectorized: true estimated row count: 333 (missing stats) table: t@bc spans: /!NULL-/4/1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (c) STORING (b); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE c > 1.0 @@ -542,6 +554,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (c); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE c < 1.0 @@ -563,6 +579,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (c); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE c > 1.0 AND b < 5 @@ -584,6 +604,10 @@ vectorized: true estimated row count: 333 (missing stats) table: t@bc spans: /!NULL-/5 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (c) STORING (b); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE b < 5.0 AND c < 1 @@ -605,6 +629,10 @@ vectorized: true estimated row count: 333 (missing stats) table: t@bc spans: /!NULL-/4/1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (c); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE (b, c) = (5, 1) @@ -621,6 +649,12 @@ vectorized: true estimated row count: 1 (missing stats) table: t@bc spans: /5/1-/5/2 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (c); +2. type: index creation + SQL command: CREATE INDEX ON t (c) STORING (b); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE (b, c) = (5.0, 1) @@ -637,6 +671,12 @@ vectorized: true estimated row count: 1 (missing stats) table: t@bc spans: /5/1-/5/2 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON t (b) STORING (c); +2. type: index creation + SQL command: CREATE INDEX ON t (c) STORING (b); query T EXPLAIN (VERBOSE) SELECT a FROM t WHERE (b, c) = (5.1, 1) @@ -658,6 +698,10 @@ vectorized: true estimated row count: 990 (missing stats) table: t@bc spans: /!NULL- +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (c) STORING (b); # Note the span is reversed because of #20203. query T @@ -703,6 +747,12 @@ vectorized: true estimated row count: 1 (missing stats) table: abcd@abcd spans: /1/4-/1/5 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON abcd (a) STORING (b); +2. type: index creation + SQL command: CREATE INDEX ON abcd (b) STORING (a); query T EXPLAIN (VERBOSE) SELECT b FROM abcd WHERE (a, b) IN ((1, 4), (2, 9)) @@ -801,6 +851,10 @@ vectorized: true table: abz@abz_c_b_key spans: LIMITED SCAN limit: 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abz (c); # Issue #14426: verify we don't have an internal filter that contains "a IN ()" # (which causes an error in DistSQL due to expression serialization). @@ -831,6 +885,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: tab0@tab0_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON tab0 (b) STORING (a); # Check that no extraneous rows are fetched due to excessive batching (#15910) # The test is composed of three parts: populate a table, check @@ -867,6 +925,10 @@ vectorized: true table: test2@test2_k_key spans: /!NULL-/"100"/PrefixEnd limit: 20 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX test2@test2_k_key; CREATE INDEX ON test2 (k) STORING (v); # The result output of this test requires that vectorized execution # is not used, so it has been moved to select_index_vectorize_off. @@ -929,6 +991,12 @@ vectorized: true missing stats table: favorites@favorites_glob_fav_idx spans: [/'GAME'/'web'/'MT'/'xxx'/'en_GB'/'ts' - /'GAME'/'web'/'MT'/'xxx'/'en_GB'/'ts'] [/'GAME'/'web'/'MT'/'xxx'/'en_GB'/'ts2' - /'GAME'/'web'/'MT'/'xxx'/'en_GB'/'ts2'] [/'GAME'/'web'/'MT'/'xxx'/'en_GB'/'ts3' - /'GAME'/'web'/'MT'/'xxx'/'en_GB'/'ts3'] +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON favorites (jurisdiction) STORING (resource_type, resource_key, device_group, brand, locale); +2. type: index creation + SQL command: CREATE INDEX ON favorites (brand) STORING (resource_type, resource_key, device_group, jurisdiction, locale); query TI rowsort SELECT @@ -960,6 +1028,10 @@ vectorized: true estimated row count: 9 (missing stats) table: abcd@abcd spans: /NULL/6-/!NULL +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (b) STORING (a, c, d); query T EXPLAIN (VERBOSE) SELECT * FROM abcd@abcd WHERE a IS NULL AND b < 5 @@ -972,6 +1044,10 @@ vectorized: true estimated row count: 9 (missing stats) table: abcd@abcd spans: /NULL/!NULL-/NULL/5 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (b) STORING (a, c, d); query T EXPLAIN (VERBOSE) SELECT * FROM abcd@abcd WHERE a IS NULL ORDER BY b @@ -985,6 +1061,10 @@ vectorized: true estimated row count: 10 (missing stats) table: abcd@abcd spans: /NULL-/!NULL +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (a) STORING (b, c, d); query T EXPLAIN (VERBOSE) SELECT * FROM abcd@abcd WHERE a = 1 AND b IS NULL AND c > 0 AND c < 10 ORDER BY c @@ -998,6 +1078,10 @@ vectorized: true estimated row count: 1 (missing stats) table: abcd@abcd spans: /1/NULL/1-/1/NULL/10 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (a) STORING (b, c, d); # Regression test for #3548: verify we create constraints on implicit columns # when they are part of the key (non-unique index). @@ -1171,6 +1255,10 @@ vectorized: true estimated row count: 10 (missing stats) table: xy@xy_y_idx spans: /NULL-/!NULL +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX xy@xy_y_idx; CREATE INDEX ON xy (y) STORING (x); query T EXPLAIN (VERBOSE) SELECT * FROM xy WHERE y IS NOT DISTINCT FROM 4 @@ -1189,6 +1277,10 @@ vectorized: true estimated row count: 10 (missing stats) table: xy@xy_y_idx spans: /4-/5 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX xy@xy_y_idx; CREATE INDEX ON xy (y) STORING (x); query T EXPLAIN (VERBOSE) SELECT x FROM xy WHERE y > 0 AND y < 2 ORDER BY y @@ -1210,6 +1302,10 @@ vectorized: true estimated row count: 10 (missing stats) table: xy@xy_y_idx spans: /1-/2 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX xy@xy_y_idx; CREATE INDEX ON xy (y) STORING (x); query T EXPLAIN (VERBOSE) SELECT * FROM xy WHERE y IS DISTINCT FROM NULL @@ -1309,6 +1405,10 @@ vectorized: true missing stats table: noncover@b spans: [/2 - /2] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@b; CREATE INDEX ON noncover (b) STORING (c, d); statement ok SET tracing = on,kv,results; SELECT * FROM noncover WHERE b = 2; SET tracing = off @@ -1346,6 +1446,10 @@ vectorized: true missing stats table: noncover@c spans: [/6 - /6] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@c; CREATE INDEX ON noncover (c) STORING (b, d); statement ok SET tracing = on,kv,results; SELECT * FROM noncover WHERE c = 7; SET tracing = off @@ -1384,6 +1488,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: noncover@noncover_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@c; CREATE INDEX ON noncover (c) STORING (b, d); query T EXPLAIN (VERBOSE) SELECT * FROM noncover WHERE c > 0 ORDER BY c @@ -1407,6 +1515,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: noncover@noncover_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@c; CREATE INDEX ON noncover (c) STORING (b, d); query T EXPLAIN (VERBOSE) SELECT * FROM noncover WHERE c > 0 AND d = 8 @@ -1424,6 +1536,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: noncover@noncover_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON noncover (d, c) STORING (b); # The following testcases verify that when we have a small limit, we prefer an # order-matching index. @@ -1441,6 +1557,10 @@ vectorized: true missing stats table: noncover@noncover_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@c; CREATE INDEX ON noncover (c) STORING (b, d); query T EXPLAIN SELECT * FROM noncover ORDER BY c LIMIT 5 @@ -1456,6 +1576,10 @@ vectorized: true table: noncover@c spans: LIMITED SCAN limit: 5 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@c; CREATE INDEX ON noncover (c) STORING (b, d); query T EXPLAIN (VERBOSE) SELECT * FROM noncover ORDER BY c OFFSET 5 @@ -1479,6 +1603,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: noncover@noncover_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@c; CREATE INDEX ON noncover (c) STORING (b, d); # TODO(radu): need to prefer the order-matching index when OFFSET is present. query T @@ -1506,6 +1634,10 @@ vectorized: true table: noncover@c spans: LIMITED SCAN limit: 10 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@c; CREATE INDEX ON noncover (c) STORING (b, d); query T EXPLAIN (VERBOSE) SELECT * FROM noncover ORDER BY c LIMIT 1000000 @@ -1525,6 +1657,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: noncover@noncover_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX noncover@c; CREATE INDEX ON noncover (c) STORING (b, d); # ------------------------------------------------------------------------------ # These tests verify that while we are joining an index with the table, we @@ -1589,6 +1725,10 @@ vectorized: true estimated row count: 3 (3.3% of the table; stats collected ago) table: t2@bc spans: /2-/3 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t2 (b) STORING (c, s); # We do NOT look up the table row for '21' and '23'. statement ok @@ -1625,6 +1765,10 @@ vectorized: true estimated row count: 3 (3.1% of the table; stats collected ago) table: t2@bc spans: /2/!NULL-/2/2 /2/3-/3 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t2 (b) STORING (c, s); # We do NOT look up the table row for '22'. statement ok @@ -1736,6 +1880,10 @@ vectorized: true estimated row count: 3 (3.3% of the table; stats collected ago) table: t2@bc spans: /2-/3 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t2 (b) STORING (s); statement ok CREATE TABLE t3 (k INT PRIMARY KEY, v INT, w INT, INDEX v(v)) @@ -1762,6 +1910,10 @@ vectorized: true estimated row count: 90 (missing stats) table: t3@v spans: /1-/10 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t3@v; CREATE INDEX ON t3 (v) STORING (w); # ------------------------------------------------------------------------------ # These tests are for the point lookup optimization: for single row lookups on diff --git a/pkg/sql/opt/exec/execbuilder/testdata/select_index_flags b/pkg/sql/opt/exec/execbuilder/testdata/select_index_flags index 09ce0d51ac27..e6e307c621ad 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/select_index_flags +++ b/pkg/sql/opt/exec/execbuilder/testdata/select_index_flags @@ -137,6 +137,10 @@ vectorized: true table: abcd@b spans: LIMITED SCAN limit: 5 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX abcd@b; CREATE INDEX ON abcd (b) STORING (c, d); # Force index b, reverse scan. query T @@ -153,6 +157,10 @@ vectorized: true table: abcd@b spans: LIMITED SCAN limit: 5 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX abcd@b; CREATE INDEX ON abcd (b) STORING (c, d); # Force index b, forward scan. @@ -173,6 +181,10 @@ vectorized: true missing stats table: abcd@b spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX abcd@b; CREATE INDEX ON abcd (b) STORING (c, d); # Force index cd query T @@ -239,6 +251,10 @@ vectorized: true missing stats table: abcd@b spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (c) STORING (b); # No hint, should be using index cd query T @@ -251,6 +267,10 @@ vectorized: true missing stats table: abcd@cd spans: [/20 - /39] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (c) STORING (d); # Force primary index query T @@ -284,6 +304,10 @@ vectorized: true missing stats table: abcd@b spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (c) STORING (d); query T EXPLAIN SELECT * FROM abcd@{FORCE_INDEX=b} WHERE a >= 20 AND a <= 30 @@ -315,6 +339,10 @@ vectorized: true missing stats table: abcd@cd spans: [/10 - /10] +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (c) STORING (b, d); query T EXPLAIN SELECT b, c, d FROM abcd@{NO_INDEX_JOIN} WHERE c = 10 @@ -329,6 +357,10 @@ vectorized: true missing stats table: abcd@abcd_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcd (c) STORING (b, d); query T EXPLAIN SELECT b, c, d FROM abcd@{FORCE_INDEX=bcd} WHERE c = 10 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/stats b/pkg/sql/opt/exec/execbuilder/testdata/stats index c589e2bdaff2..c18aa31c3f62 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/stats +++ b/pkg/sql/opt/exec/execbuilder/testdata/stats @@ -50,6 +50,10 @@ vectorized: true estimated row count: 1 (12% of the table; stats collected ago) table: uv@uv_v_idx spans: /1-/2 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uv (u, v); # Verify that injecting different statistics changes the plan. statement ok @@ -84,6 +88,10 @@ vectorized: true estimated row count: 1 (1.0% of the table; stats collected ago) table: uv@uv_u_idx spans: /1-/2 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uv (u, v); # Verify that injecting different statistics with null counts # changes the plan. @@ -121,6 +129,10 @@ vectorized: true estimated row count: 5 (5.0% of the table; stats collected ago) table: uv@uv_u_idx spans: /1-/2 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uv (u, v); statement ok ALTER TABLE uv INJECT STATISTICS '[ @@ -156,6 +168,10 @@ vectorized: true estimated row count: 1 (1.1% of the table; stats collected ago) table: uv@uv_v_idx spans: /1-/2 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uv (u, v); statement ok ALTER TABLE uv INJECT STATISTICS '[ diff --git a/pkg/sql/opt/exec/execbuilder/testdata/subquery b/pkg/sql/opt/exec/execbuilder/testdata/subquery index daa4176e18ef..1300a4d4b5e5 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/subquery +++ b/pkg/sql/opt/exec/execbuilder/testdata/subquery @@ -120,6 +120,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: abc@abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (c) STORING (b); # IN expression transformed into semi-join. query T @@ -155,6 +159,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: abc@abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (b); query T EXPLAIN SELECT * FROM (SELECT * FROM (VALUES (1, 8, 8), (3, 1, 1), (2, 4, 4)) AS moo (moo1, moo2, moo3) ORDER BY moo2) as foo (foo1) ORDER BY foo1 @@ -236,6 +244,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: tab4@tab4_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON tab4 (col0) STORING (col3, col4); # ------------------------------------------------------------------------------ # Correlated subqueries. diff --git a/pkg/sql/opt/exec/execbuilder/testdata/subquery_correlated b/pkg/sql/opt/exec/execbuilder/testdata/subquery_correlated index f08b31baf4a9..d95ed3323ade 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/subquery_correlated +++ b/pkg/sql/opt/exec/execbuilder/testdata/subquery_correlated @@ -48,3 +48,7 @@ vectorized: true missing stats table: o@o_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON o (c_id) STORING (ship); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/topk b/pkg/sql/opt/exec/execbuilder/testdata/topk index 679d26419049..d57bf267d7c6 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/topk +++ b/pkg/sql/opt/exec/execbuilder/testdata/topk @@ -22,6 +22,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (w) STORING (v); # No TopK when ordering by an index. query T @@ -44,6 +48,10 @@ vectorized: true table: t@v spans: LIMITED SCAN limit: 10 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t@v; CREATE INDEX ON t (v) STORING (w); # TopK descending. query T @@ -64,6 +72,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (w) STORING (v); # TopK added in subquery. query T @@ -88,6 +100,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (w); # TopK with filter. query T @@ -113,6 +129,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@t_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (w) STORING (v); # When partial ordering is available, choose topk. query T @@ -139,3 +159,7 @@ vectorized: true estimated row count: 1,000 (missing stats) table: t@v spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON t (v, w); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/union b/pkg/sql/opt/exec/execbuilder/testdata/union index 0226c6fd5d62..01d025601a79 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/union +++ b/pkg/sql/opt/exec/execbuilder/testdata/union @@ -93,6 +93,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: abc@abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abc (a) STORING (b); # Regression test for #32723. query T @@ -196,6 +200,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: uniontest@uniontest_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniontest (k); statement ok CREATE TABLE ab (a INT NOT NULL, b INT, INDEX(a, b), INDEX (b, a)) @@ -285,6 +293,12 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykUV1rpDAUfd9fEe7TLpth1H3LkzM7LgiuzupsaSki0VwGwRqbRFAG_3tRW6ZCp7TTp3DPxz0nyQn0YwUMvNt9sPFD8n3nJ4fkX0DJjRdvo8T7QRIv8H4fCKckJ3_i6C_hOfkf-lFINkHwwnZkk4ySfjyfdV1PonjnxWR7RzhQqKXAkD-gBnYPNqQUGiUL1FqqETpNAl90wCwKZd20ZoRTCoVUCOwEpjQVAoMDzyuMkQtUawsoCDS8rKa1Xe92fdZlfVaKDigkDa81IyugELWGEdemrgPpQEG25pygDT8iMHug17Wwly147vI841l-VQvnYotzuFQCFYplrGv_hHR4o2ooV7JZOwv1pXTrM28Qo25krfGDm1MKKI44X0XLVhW4V7KYYuYxmnwTIFCbmXXmwa8navqk12b7K2bnXfOvhdka0uHbUwAAAP__lnwFDg== +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON ab (a) STORING (b); +2. type: index creation + SQL command: CREATE INDEX ON xy (x) STORING (y); # TODO(yuzefovich): The synchronizers in the below DistSQL plans are all # unordered. This is not a problem, but we shouldn't need an input synchronizer @@ -343,6 +357,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJycUWGLnDAQ_d5fEebTHU059b4FCu71LAjeejVSWopINFMrWGOTCMrify8qx9Zlt-3et8ybeTPvvRzA_GqAQfDlOdqFe3LzGPKUf4oo-RwkDzEPbgkPouBDSgryMYmfiChIuE-DhM_YLope2gPZ8ZeZYSRx8hgk5OErKYBCqyTuxU80wL6BCxmFTqsSjVF6hg7LQCgHYA6Fuu16O8MZhVJpBHYAW9sGgUEqigYTFBL1nQMUJFpRN8vaYfSHMR_yMa_lABR4J1rDyDugEPeWEd-FbKKgentcb6yoEJg70ddJcLcSROGLIi9ycUmCd1GCd1HC8XLfKi1Ro9xczWbmv0bO-HhCXSFHG3d33tZGOnbItp8MFBr8bm989-3te11XP9bnf2R7f022CZpOtQZPDZ7d7MyuUFa4pmRUr0t81qpczqxlvPAWQKKxa9dbi7BdWkvyf5LdK8juKdn7K_l-Q3ambHrzOwAA__8EXx8z +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON ab (b); query T EXPLAIN (DISTSQL,VERBOSE) SELECT b, a FROM ab INTERSECT ALL SELECT y AS b, x AS a FROM xy ORDER BY b @@ -370,6 +388,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJycUVFrnTAYfd-vCN9TSzN6Y98CA29XB4K9dkbGxhCJ5psTnHFJBOXifx_qtjtLu9L7FL6Tc3LOyXcE-7MBDsHnh2gfHsjFXShS8TGi5FOQ3MYiuCQiiIL3KSkokeRDEt8TWZDwkAaJmOF9FP1hjGQvZtown7-5w0ji5C5IyO0XUgCFVis8yB9ogX8FBhmFzugSrdVmho4LIVQD8B2Fuu16N8MZhVIbBH4EV7sGgUMqiwYTlArN9Q4oKHSybpZnh9EfxnzMh7xWA1AQnWwtJ2-BQtw7TnyP-gyyiYLu3cnBOlkhcDbR81KwbQpZ-LLIi1yelcJ7NsXJvG-1UWhQbYyzWfkS5Ykq92gqFOji7trbNknHDvl25UChwW_uwmdX1PeuLt-Zuvp-Gv92ZNT3nu1485qfTtB2urX4uOuTL-_mgqgqXD_M6t6U-GB0udisY7zoFkChdeuttw5hu1wtS_hXzF4hZo_F3n_FNxvxbsqmN78CAAD__zutJUU= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON ab (b) STORING (a); query T EXPLAIN (DISTSQL,VERBOSE) SELECT b, a FROM ab EXCEPT SELECT y AS b, x AS a FROM xy ORDER BY b @@ -397,6 +419,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykktGLm0AQxt_7VyzzdMdtSTS5l4WCuYuFgHemKuVKEVndaSpY1-6uoIT870XtNTVcLEmfwnwzv_m-2bgH_bMABu7L1lttnsnNehNG4SePks9u8OCH7i0JXc99jEhKCScfA_-J8JS4L4_uNnpttWQVdv2m-_091LTED9ZuQB6-kBQolFLgM_-BGthXsCCmUCmZodZSddK-H9iIBticQl5WtenkmEImFQLbg8lNgcAg4mmBAXKBajYHCgINz4t-LU8dniZpwpNcNEAhrHipGXkPFPzaMOLY1LEgPlCQtTk6aMN3CMw60OtSWOMUTes0bdImzVUp7EtSrHNt8jIzM3scwbGo00m-EqhQMDII5zwXV3ku_stzedbzaFWXclg2coo78l8jbwR_QrXDEI1fzZbj6FFbIXv9pleeBxQK_GZuHOuOOvbd7QeV774fyz9_5OSB95c8aoC6kqXG00Pf3DzvrkOxw-G1tKxVhlsls95mKP2e6wWB2gxdeyg25dDqAv4NW5PwYhq2J-HlCLZO4cUFsH0KLyfh-5PY8eHdrwAAAP__SsSUMg== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON ab (b) STORING (a); query T EXPLAIN (DISTSQL,VERBOSE) SELECT a, b FROM ab EXCEPT ALL SELECT x AS a, y AS b FROM xy ORDER BY b, a @@ -470,6 +496,12 @@ vectorized: true spans: /1-/2 · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykku-L2k4Qxt9__4phXunXOWJ-HWVB2LuaowGbXBP7iyISs8MR8BK7WeGK-L8XE8HTalrbN4GdmWc-T57dDdbflygw-PI4uQsj6I3DdJp-mBB8CpL7OA36kAaT4O0U_oeHJH4Pvf0xI1gQ5ASKgNtWtsgVw8cojCM4TOXN4MlUHz6_C5IAejmMwO7DXTSGnoIRcB_iZBwkcP8VMiQsK8VR9sw1im9o44xwpauc67rSu9KmGQjVC4ohYVGu1mZXnhHmlWYUGzSFWTIKnGaLJSecKdbWEAkVm6xYNmsbR7L5zhfzfK7mPC_UCxKmq6ysBVj2jeXgbEtYrc0BUZvsiVHYW_pzGw_F0rBmbdnHHtq6AOnBCKR_EeZcA0srbVhbzjFK2gMkjNdGgLRJuiQdkh51QN1roK-Dds8FvdLFc6Z_HOK9uQj2_ipa73y0PenuHpsQIoymb_Zvbp93_6IF_6KFA7nSijWrX2Im6QxIugOS3oCkP8DZ9ozvcVGbosyN5Z8uaG7G_c3l3F6TUcL1qiprPiJd2jzcuWX1xO3f1tVa5_yoq7zBtMe40TUFxbVpu3Z7CMu2tTP4Wmx3ip1usdMp9o_E9qnY7RR73WTvX8h-p_j2hDzb_vczAAD__6qVwrQ= +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON abcde (c) STORING (b, d, e); +2. type: index creation + SQL command: CREATE INDEX ON abcde (b) STORING (c, d, e); query T EXPLAIN (DISTSQL,VERBOSE) SELECT * FROM (SELECT a, b, c, d, e FROM abcde UNION SELECT a, c, b, d, e FROM abcde) WHERE c = 1 AND d = e ORDER BY b, c, d, e, a @@ -509,6 +541,12 @@ vectorized: true spans: /1-/2 · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykkm-L2kAQxt_3UwzzSuscukmEsiDsXc3RgE2u0f6jiMTscARsYndXOBC_ezER_MPF1vZNYGfmmeeXZ3eL9tcKJYbfnib3UQydcTSdTT9NCL6E6UMyDbswDSfh-xm8hcc0-QidwzEjWBLkBJqAm1a2zDXD5zhKYjhO5fXgxVQXvn4I0xA6OYxAdOE-HkNHwwi4C0k6DlN4-H6ynyBDwrLSHGc_2aL8gQLnhGtT5WxtZfalbT0Q6ReUA8KiXG_cvjwnzCvDKLfoCrdilDjLlitOOdNs-gMk1OyyYlWvrelU_V0sF_lCL3hR6BcknK6z0kroi7u-h_MdYbVxRwvrsmdGKXb09xiPxcqxYdMX5wxNXYIKYARqiITJxklQgpRPyiMVkBq2Ini3IJwm4d2YxF0rgv9PKfivp9BR_v6NSCmjePbu8FQO0XRbEYJWhKNzZTQb1ue2yuuR8nukgh4p0SM17OF89wr3uLCuKHPXDy4WiPqO_D9c0_CWjFK266q0fObUtnmwp2X9zM3f2mpjcn4yVV7bNMek1tUFzdY1XdEcorJp7QFPxeKqODgTi0uxd1XsX3f2_8c5uCoeXjjPd29-BwAA__-0e5X_ +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON abcde (c, d, e, b); +2. type: index creation + SQL command: CREATE INDEX ON abcde (b) STORING (c, d, e); query T EXPLAIN (DISTSQL,VERBOSE) SELECT * FROM (SELECT * FROM abcde UNION ALL SELECT * FROM abcde) WHERE c = 1 AND d = e ORDER BY a @@ -548,6 +586,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyskN1q20AQhe_7FMNcSe0GW5YCZcEgp95QgSqlkvtH0cVGOwSBolV319Bi_O7FUiFRiE3S5HJ-znznzA7trxY5iu9X6SrJwFsn5ab8nDL4KoqLvBQ-lCIVHzbwFi6L_BN401Je14rgS5bkGazSFB6Z-vDtoygEeDUsIfBhla3BU7AE8iEv1qKAix8gkWGnFWXylizynxhgxbA3uiZrtTm0dsNCon4jnzNsun7rDu2KYa0NId-ha1xLyHEjr1sqSCoyszkyVORk0w5nB0dxb5pbaf4gw7KXneVwhtWeod66u6PWyRtCHuzZ08GXTevIkJkFU-rY5-DF4eEHnPMk27z_94o4giXE5_5RC4vnWLifffHC7OF_ZQ9fM3t01MIdWRtFhtQUGwfvsNo_4jPTZ7qfRZPtY_T5cx5QkO11Z-mJlyuGpG5ojGL11tR0ZXQ9YMYyH3RDQ5F14zQYi6QbRweD98XBSXE0EQcPxYuT4vA0OXwJOTopPn9ArvZv_gYAAP__aIR-OA== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcde (c) STORING (b, d, e); query T EXPLAIN (DISTSQL,VERBOSE) SELECT * FROM (SELECT * FROM abcde UNION ALL SELECT * FROM abcde) WHERE c = 1 AND d = e ORDER BY b, c, d, e, a @@ -587,6 +629,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyskG9rm1AUxt_vUxzOq7ickhgtjAsB08UywWmn2T-GiPEeiuC87l4DhZDvPqKD1tKEdu0b4TzH5zy_--zR_KlRoP_jJlwFEUzWQbpJv4QE3_zkKk59C1I_9D9u4D1cJ_FnmIzHYltKhq9REEewCkN4YmvB909-4sOkhCXYFqyiNUwkLIEtiJO1n8DVT9gSlASSgAkKJGyU5Kj4zQbFL7QxI2y1KtkYpY_Svv8hkHco5oRV0-66o5wRlkozij12VVczCtwU25oTLiTr2RwJJXdFVfdnezqv_-bbvMxlznkl75AwbYvGCLjA7ECodt39edMVt4zCPtDzEa6rumPNemaP8wddwMRzjs0IIYJo8-FfQZ4LS_AurZMIi5cgPGxh8WYtOP_VgvOWLbgnEe6TlZasWY5jvcWUPGdKnjslz55idniCOVIXqp25I-cpkvlLykjYtKox_MzLGSHLWx6eZdROl3yjVdnHDGPc-3pBsumGrT0MQTOsjoAPzfZZszsy24_Ni7Nm53yy85pk96z58lFydnj3NwAA__-m3oqG +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcde (c, d, e) STORING (b); query T EXPLAIN (DISTSQL,VERBOSE) SELECT b, c, d, e FROM (SELECT b, c, d, e FROM abcde INTERSECT SELECT b, c, d, e FROM abcde) WHERE c = 1 AND d = e ORDER BY b @@ -626,6 +672,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0lF-L2kAUxd_7KS73KcEpbv7olgFhdmuWBlyzTUL_UERi5tYG0iSdjLBF_O4lSdtVu6Z12b4Ic2Z-95x7kGyx_pYjR-_D3ezKn4Mx9aM4ejtj8M4Lr4PIMyHyZt7rGFYMUgaSAcFNGNyCcUJPVqkk8OexF0bNfd8zE96_8UIPjBQmYJlwNZ-CIWECZEIQTr0Qrj_CChkWpaR58pVq5J_QwgXDSpUp1XWpGmnbPvDlPfILhllRbXQjLximpSLkW9SZzgk5xskqp5ASSWp4gQwl6STL27FtItH-LlfLdCmXtMzkPTKMqqSoObxEhsFGcxA2Ew4TLhMjXOwYlhv94FjrZE3IrR3791Q3Wa5JkRpah5E6nYMh7KYgzrk_j1_97Ek4MAHhmicj2OdE2C_G_p_FOE8qxnnOYtxzIkyzWmdFqofuYQRhsV_rNusrSYokh0Z2TjqPnuQ8egbn8UnnB8NNUXbDDvwWDfm3J4_EvyW1poh0UA3HhwvE3yvie5-Iq9kMGeb0WRvCGjDhDJiwB0y4A3OisvWXP-Xff7i9Kk5tfnlO5yHVVVnUdNzAo5MvmrVJrqmrsS43KqU7VaatTXcMWq4VJNW6u7W6g190V03AfdjqhUf9sN0LO_2w0wu7_bDbC48PYOsYHp0B28fwuBe-PIq92L34EQAA___LAyzi +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcde (c, d, e) STORING (b); query T EXPLAIN (DISTSQL,VERBOSE) SELECT b, c, d, e FROM (SELECT b, c, d, e FROM abcde EXCEPT SELECT b, c, d, e FROM abcde) WHERE c = 1 AND d = e ORDER BY b, c, d, e @@ -665,6 +715,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0lN9q20wQxe-_pxjmSsL74eiPnbJg2CRWqMGxUkm0KcUYWTt1BaqkrtaQEvzuRVLT2G6k1iG9MezZ_c05czB6wOpbhhy9u9v5xWwBxnQWRuG7OYP3XnDph54JoTf3riJYM0gYSAYE14F_A0aHHq8TSeDdXXm3URfbvDHhw1sv8MBIYAKWCReLKRgSJkAm-MHUC-Dy4x6JDPNC0iL-ShXyT2jhkmGpioSqqlC19NA8mMl75GcM07zc6lpeMkwKRcgfUKc6I-QYxeuMAoolqeEZMpSk4zRrxjbRRPO7Wq-SlVzRKpX3yDAs47zi8D8y9Leag7CZcJhwmRjhcsew2Oonx0rHG0Ju7djfp7pOM02K1NA6jNTqHAxh101xzmeL6M3PwoQDExCu2RnBPiXCfjH2vyzGeVExzmsW454SYZpWOs0TPXQPIwiLPa5br68kKZIcatnpdB69yHn0Cs7jTucnw21etMMO_JY1-acnz8S_IbWhkLRfDseHC0TfS-KPH4qL-RwZZvRZG8IaMOEMmLAHTLgDc6LSzZff5V__tr0eutY-P6XwgKqyyCs6Xv_ZyWf1ziQ31HZYFVuV0K0qksamPfoN1wiSKt3eWu1hlrdXdcB92OqF3X7Y7oWdftjphUf9sNsLjw9g6xgenQDbx_C4Fz4_ir3c_fcjAAD__7UjLSI= +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcde (c, d, e) STORING (b); query T EXPLAIN (DISTSQL,VERBOSE) SELECT * FROM (SELECT * FROM abcde EXCEPT ALL SELECT * FROM abcde) WHERE c = 1 AND d = e ORDER BY a @@ -704,6 +758,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyskm-L2kAQxt_3UwzzKqlbNH-EsiCsd-ao4BmbhPZK8UUuO7WBXJLurtBD_O4lSeGMqK3tvZyZ_c0zz5PsUP8okGPwsFpM50uwZvM4iT8uGHwKopswDmyIg0Vwm8BbuIvCe7D6ZfqYSYLg4TZYJTBdLODE2IbPH4IoACuDCTg2TJczsCRMgGwIo1kQwc0XSJFhWUlapk-kkX9FB9cMa1VlpHWlmtaufTCXP5GPGOZlvTVNe80wqxQh36HJTUHIMUkfC4oolaSGI2QoyaR50a5tLxK1yp9S9YwM4zotNYd3uN4zrLbmZak26YaQO3v298J3eWFIkRo6fdWuz8ESXpMB53y-TN7_jkL4MAExts-e4F5zwqF39z-9e__k3XtN7_7ZE16Ut2WlJCmSPeF1Q_7pyQkf96Q2FJMJ66Hfd5I818QPfnZkWNA3YwlnwIQ7YMIbMOEPmBgP7InKN99Pj5BhuDUchMOEy4THhM_E-GwC42s-QkS6rkpNx0mc3Dxq7JPcUBenrrYqo5WqslamK8OWaxuStOmmTlfMy27UHHgIOxdhvwc7x7B7EfYuK3tXKLvHsH8RHh8pr_dvfgUAAP__ApejQg== +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcde (c) STORING (b, d, e); query T EXPLAIN (DISTSQL,VERBOSE) SELECT * FROM (SELECT * FROM abcde INTERSECT ALL SELECT * FROM abcde) WHERE c = 1 AND d = e ORDER BY b, c, d, e, a @@ -743,6 +801,10 @@ vectorized: true spans: FULL SCAN · Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJysk9uLm1AQxt_7VwzzpM2UjZdAORA42calQjZuVXqhhGA801Swao8GtoT870Ut7BqStCn7EpjLN993fsE91j9zFOh9fljM_CUYcz-Kow8Lgo9eeBtEngmRt_DexfAa7sLgHoxhmWxSxeAvYy-M2vZssYATGyZ8eu-FHhgpTMEyYbacg6FgCmxCEM69EG6_wIYgJVAETJAgYVEqXiY_uEbxFS1cEVa6TLmuS9229t2Crx5RjAmzoto1bXtFmJaaUeyxyZqcUWCcbHIOOVGsb8ZIqLhJsrw726WT3e96s07Xas3rTD0iYVQlRS3gDa4OhOWueTpfN8mWUVgH-vcId1nesGZ9Yw39-74AQzotGSGEv4zf_gEkXZiCnJhnI9jXRHhOwX4xCs5_UXBekoJ7NsKT864otWLNamC8apV_WznxjnvWW464Caobd_iS-FfFYvg9IGHO3xpD2iOS7oikNSLpjEhORuZUZ9vvp0dIGOwaAdIiaZN0SLokJ2chTK75H0Kuq7Ko-RjGycvjlgCrLfdE63KnU37QZdrZ9GXQ6bqG4rrpp1Zf-EU_agM-F1sXxe5AbB-L7Yti57Kzc4WzdSx2L4onR86rw6vfAQAA___SLa8C +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON abcde (c, d, e) STORING (b); # Regression test for #64181. Ensure that a projection on top of an ordered # UNION ALL correctly projects away ordering columns. diff --git a/pkg/sql/opt/exec/execbuilder/testdata/unique b/pkg/sql/opt/exec/execbuilder/testdata/unique index afa9f88d517b..df937c0e678b 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/unique +++ b/pkg/sql/opt/exec/execbuilder/testdata/unique @@ -288,6 +288,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq (w); +2. type: index creation + SQL command: CREATE INDEX ON uniq (x) STORING (y); # No need to plan checks for w since it's always null. # We still plan checks for x,y since neither column is null in all rows. @@ -323,6 +329,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq (x, y); # Use all the unique indexes and constraints as arbiters for DO NOTHING with no # conflict columns. @@ -389,6 +399,12 @@ vectorized: true row 0, expr 2: 3 row 0, expr 3: 4 row 0, expr 4: 5 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq (x, y); +2. type: index creation + SQL command: CREATE INDEX ON uniq (w); # Insert with non-constant input. query T @@ -507,6 +523,12 @@ vectorized: true └── • scan buffer estimated row count: 2 label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_overlaps_pk (b, c, a, d); +2. type: index creation + SQL command: CREATE INDEX ON uniq_overlaps_pk (c) STORING (d); # Insert with non-constant input. # Add inequality filters for the hidden primary key column. @@ -631,6 +653,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (a); +2. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (b, c, rowid); # Combine unique checks with foreign keys. There should be two foreign key # checks and one uniqueness check. @@ -699,6 +727,14 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 3 +1. type: index creation + SQL command: CREATE INDEX ON uniq_fk_child (c); +2. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (b, c); +3. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (a); # Test that we use the index when available for the insert checks. query T @@ -817,6 +853,10 @@ vectorized: true └── • scan buffer columns: (column1, column2, column3, column4, check1) label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_enum (s) STORING (j); # Test that we use the index when available for the insert checks. This uses # the default value for columns r and j. @@ -967,6 +1007,10 @@ vectorized: true row 1, expr 1: 'bar' row 1, expr 2: 2 row 1, expr 3: 2 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_enum (s, j); # None of the inserted values have nulls. query T @@ -1032,6 +1076,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (a, b); +2. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b); # No need to plan checks for a since it's always null. query T @@ -1073,6 +1123,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b); # Use all the unique indexes and constraints as arbiters for DO NOTHING with no # conflict columns. @@ -1173,6 +1227,12 @@ vectorized: true estimated row count: 1 (missing stats) table: uniq_partial@uniq_partial_pkey spans: /1/0 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b); +2. type: index creation + SQL command: CREATE INDEX ON uniq_partial (a, b); # Insert with non-constant input. query T @@ -1239,6 +1299,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b) STORING (a); # No need to build uniqueness checks when the primary key columns are a subset # of the partial unique constraint columns. @@ -1297,6 +1361,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial_hidden_pk (c) STORING (b); # Test that we use the partial index when available for the insert checks. query T @@ -1381,6 +1449,10 @@ vectorized: true └── • scan buffer columns: (column1, column2, column3, column4, check1, partial_index_put1) label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial_enum (b, a) STORING (c); # Test that we use the partial index when available for de-duplicating INSERT ON # CONFLICT DO NOTHING rows before inserting. @@ -1449,6 +1521,10 @@ vectorized: true row 1, expr 1: 2 row 1, expr 2: 2 row 1, expr 3: 'bar' +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial_enum (b) STORING (c); # We can eliminate uniqueness checks for i and s due to functional dependencies. # We cannot eliminate checks for d, since functional dependencies could not be @@ -1488,6 +1564,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_computed_pk (d); # By default, we do not require checks on UUID columns set to gen_random_uuid(), # but we do for UUID columns set to other values. @@ -1524,6 +1604,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id2); # The default value of id1 is gen_random_uuid(), so we don't need to plan checks # for it. But the default value of id2 is '00000000-0000-0000-0000-000000000000', @@ -1561,6 +1645,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id2); # We can also detect gen_random_uuid() when it is a projection. query T @@ -1654,6 +1742,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id1); +2. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id2); statement ok SET CLUSTER SETTING sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled = false @@ -1717,6 +1811,10 @@ vectorized: true missing stats table: uniq@uniq_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq (w); # No need to plan checks for x,y since x is always null. # Also update the primary key. @@ -1758,6 +1856,10 @@ vectorized: true missing stats table: uniq@uniq_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq (w); # No need to plan checks since none of the columns requiring checks are updated. query T @@ -1847,6 +1949,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_overlaps_pk (c); statement ok ALTER TABLE uniq_overlaps_pk VALIDATE CONSTRAINT unique_a @@ -1921,6 +2027,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_overlaps_pk (c); # Update with non-constant input. # No need to add a check for b,c since those columns weren't updated. @@ -2087,6 +2197,10 @@ vectorized: true missing stats table: uniq_fk_parent@uniq_fk_parent_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (a); # Combine unique checks with foreign keys. # There should be one fk check and one uniqueness check. @@ -2143,6 +2257,12 @@ vectorized: true missing stats table: uniq_fk_parent@uniq_fk_parent_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_fk_child (c); +2. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (b, c); # Test that we use the index when available for the update checks. query T @@ -2272,6 +2392,10 @@ vectorized: true row 0, expr 0: 'us-east' row 1, expr 0: 'us-west' row 2, expr 0: 'eu-west' +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_enum (j, i) STORING (s); # None of the updated values have nulls. query T @@ -2340,6 +2464,10 @@ vectorized: true missing stats table: uniq_partial@uniq_partial_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b) STORING (a); # No need to plan checks for a since a is always null. # Also update the primary key. @@ -2387,6 +2515,10 @@ vectorized: true missing stats table: uniq_partial@uniq_partial_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b); # No need to plan checks since none of the columns requiring checks are updated. query T @@ -2475,6 +2607,10 @@ vectorized: true missing stats table: uniq_partial@uniq_partial_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b) STORING (a); # Test that we use the index when available for the update checks. query T @@ -2559,6 +2695,12 @@ vectorized: true └── • scan buffer columns: (r, a, b, b_new, partial_index_put1, partial_index_put1, c) label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial_enum (a) STORING (b, c); +2. type: index creation + SQL command: CREATE INDEX ON uniq_partial_enum (b) STORING (c); # By default, we do not require checks on UUID columns set to gen_random_uuid(), # but we do for UUID columns set to other values. @@ -2600,6 +2742,10 @@ vectorized: true missing stats table: uniq_uuid@uniq_uuid_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id1); statement ok SET CLUSTER SETTING sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled = true @@ -2659,6 +2805,10 @@ vectorized: true missing stats table: uniq_uuid@uniq_uuid_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id1); statement ok SET CLUSTER SETTING sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled = false @@ -2725,6 +2875,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq (w); +2. type: index creation + SQL command: CREATE INDEX ON uniq (x) STORING (y); # TODO(rytaft): The default value for x is NULL, and we're not updating either # x or y. Therefore, we could avoid planning checks for (x,y) (see #58300). @@ -2788,6 +2944,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq (w); +2. type: index creation + SQL command: CREATE INDEX ON uniq (x) STORING (y); # TODO(rytaft): No need to plan checks for w since it's always NULL (see # #58300). @@ -2851,6 +3013,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq (w); +2. type: index creation + SQL command: CREATE INDEX ON uniq (x) STORING (y); # On conflict do update with constant input. # TODO(rytaft): The default value for x is NULL, and we're not updating either @@ -2915,6 +3083,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq (w); +2. type: index creation + SQL command: CREATE INDEX ON uniq (x) STORING (y); # On conflict do update with non-constant input. # TODO(rytaft): The default value for x is NULL, and we're not updating either @@ -2987,6 +3161,12 @@ vectorized: true missing stats table: uniq@uniq_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON other (v) STORING (k); +2. type: index replacement + SQL commands: DROP INDEX uniq@uniq_v_key; CREATE INDEX ON uniq (v) STORING (w, x, y); # On conflict do update with constant input, conflict on UNIQUE WITHOUT INDEX # column. @@ -3052,6 +3232,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq (w) STORING (x, y); +2. type: index creation + SQL command: CREATE INDEX ON uniq (x) STORING (y); # Upsert with non-constant input. # Add inequality filters for the primary key columns that are not part of each @@ -3273,6 +3459,14 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 3 +1. type: index creation + SQL command: CREATE INDEX ON uniq_fk_child (a); +2. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (a); +3. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (b, c, rowid); # Combine unique checks with foreign keys. query T @@ -3340,6 +3534,14 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 3 +1. type: index creation + SQL command: CREATE INDEX ON uniq_fk_child (c); +2. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (b, c); +3. type: index creation + SQL command: CREATE INDEX ON uniq_fk_parent (a); # Test that we use the index when available for the upsert checks. query T @@ -3490,6 +3692,10 @@ vectorized: true └── • scan buffer columns: (column1, column2, column3, column4, r, s, i, j, column2, column4, r, check1, upsert_r, upsert_i) label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_enum (s) STORING (j); # Test that we use the index when available for the ON CONFLICT checks. query T @@ -3602,6 +3808,10 @@ vectorized: true └── • scan buffer columns: (column1, column2, column3, column4, r, s, i, j, upsert_i, r, check1, upsert_r) label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_enum (s, j); # None of the upserted values have nulls. query T @@ -3666,6 +3876,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (a, b); +2. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b); # TODO(rytaft/mgartner): The default value for b is NULL, and we're not updating # it. Therefore, we could avoid planning checks for (b) (see #58300). @@ -3741,6 +3957,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (a, b); +2. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b); # No need to plan checks for a since it's always NULL. query T @@ -3782,6 +4004,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b); # On conflict do update with constant input. # TODO(rytaft/mgartner): The default value for b is NULL, and we're not updating @@ -3870,6 +4096,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (a, b); +2. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b); # On conflict do update with non-constant input. # TODO(rytaft/mgartner): The default value for b is NULL, and we're not updating @@ -3958,6 +4190,10 @@ vectorized: true missing stats table: uniq_partial@uniq_partial_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial (b) STORING (a); # No need to build uniqueness checks when the primary key columns are a subset # of the partial unique constraint columns. @@ -4018,6 +4254,10 @@ vectorized: true missing stats table: uniq_partial_hidden_pk@uniq_partial_hidden_pk_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial_hidden_pk (c) STORING (b); # Test that we use the index when available for the upsert checks. query T @@ -4135,6 +4375,10 @@ vectorized: true └── • scan buffer columns: (column1, column2, column3, column4, r, a, b, c, column3, column4, r, check1, partial_index_put1, partial_index_del1, upsert_r, upsert_a) label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial_enum (b) STORING (c); # Test that we use the partial index when available for de-duplicating INSERT ON # CONFLICT DO UPDATE rows before inserting. @@ -4212,6 +4456,10 @@ vectorized: true row 1, expr 1: 2 row 1, expr 2: 2 row 1, expr 3: 'bar' +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_partial_enum (b) STORING (c); # By default, we do not require checks on UUID columns set to gen_random_uuid(), # but we do for UUID columns set to other values. @@ -4248,6 +4496,10 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id2); statement ok SET CLUSTER SETTING sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled = true @@ -4303,6 +4555,12 @@ vectorized: true │ └── • scan buffer label: buffer 1 +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id1); +2. type: index creation + SQL command: CREATE INDEX ON uniq_uuid (id2); statement ok SET CLUSTER SETTING sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled = false diff --git a/pkg/sql/opt/exec/execbuilder/testdata/update b/pkg/sql/opt/exec/execbuilder/testdata/update index f837456c71bc..1c4fde293ada 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/update +++ b/pkg/sql/opt/exec/execbuilder/testdata/update @@ -235,6 +235,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: xyz@xyz_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX xyz@y_idx; CREATE INDEX ON xyz (y) STORING (z); # With the hint, we use a constrained scan. query T @@ -270,6 +274,10 @@ vectorized: true table: xyz@y_idx spans: /1-/1000 /2001-/3000 locking strength: for update +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX xyz@y_idx; CREATE INDEX ON xyz (y) STORING (z); statement ok CREATE TABLE pks ( @@ -335,6 +343,10 @@ vectorized: true missing stats table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); # Use case for UPDATE ... ORDER BY: renumbering a PK without unique violation. query T @@ -568,6 +580,10 @@ vectorized: true table: kv3@kv3_v_idx spans: [/10 - /10] locking strength: for update +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX kv3@kv3_v_idx; CREATE INDEX ON kv3 (v) STORING (meta); query T EXPLAIN UPDATE kv3 SET k = v WHERE v > 1 AND v < 10 @@ -588,6 +604,10 @@ vectorized: true table: kv3@kv3_v_idx spans: [/2 - /9] locking strength: for update +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX kv3@kv3_v_idx; CREATE INDEX ON kv3 (v) STORING (meta); statement ok SET enable_implicit_select_for_update = false @@ -711,6 +731,10 @@ vectorized: true missing stats table: kv3@kv3_v_idx spans: [/10 - /10] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX kv3@kv3_v_idx; CREATE INDEX ON kv3 (v) STORING (meta); query T EXPLAIN UPDATE kv3 SET k = v WHERE v > 1 AND v < 10 @@ -730,6 +754,10 @@ vectorized: true missing stats table: kv3@kv3_v_idx spans: [/2 - /9] +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX kv3@kv3_v_idx; CREATE INDEX ON kv3 (v) STORING (meta); # Reset for rest of test. statement ok diff --git a/pkg/sql/opt/exec/execbuilder/testdata/update_from b/pkg/sql/opt/exec/execbuilder/testdata/update_from index d3c3f01353ae..8ae5b320c61d 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/update_from +++ b/pkg/sql/opt/exec/execbuilder/testdata/update_from @@ -63,6 +63,10 @@ vectorized: true missing stats table: new_abc@new_abc_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON new_abc (a) STORING (b, c, crdb_internal_mvcc_timestamp, tableoid); # Returning old values. query T @@ -214,6 +218,12 @@ vectorized: true missing stats table: ac@ac_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON ab (a) STORING (b, crdb_internal_mvcc_timestamp, tableoid); +2. type: index creation + SQL command: CREATE INDEX ON ac (a) STORING (c, crdb_internal_mvcc_timestamp, tableoid); # Make sure UPDATE ... FROM works with LATERAL. query T @@ -260,3 +270,9 @@ vectorized: true missing stats table: ac@ac_pkey spans: FULL SCAN +· +index recommendations: 2 +1. type: index creation + SQL command: CREATE INDEX ON ab (a) STORING (b); +2. type: index creation + SQL command: CREATE INDEX ON ac (a) STORING (c); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/upsert b/pkg/sql/opt/exec/execbuilder/testdata/upsert index e7e611206f15..7834d4fee6cc 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/upsert +++ b/pkg/sql/opt/exec/execbuilder/testdata/upsert @@ -34,6 +34,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); # Use explicit target columns (which can use blind KV Put). query T @@ -63,6 +67,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); # Add RETURNING clause (should still use blind KV Put). query T @@ -92,6 +100,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); # Use subset of explicit target columns (which cannot use blind KV Put). query T @@ -139,6 +151,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v); # Use Upsert with indexed table, default columns, computed columns, and check # columns. diff --git a/pkg/sql/opt/exec/execbuilder/testdata/virtual_columns b/pkg/sql/opt/exec/execbuilder/testdata/virtual_columns index 5aaa8493fdbe..d847c78a7dda 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/virtual_columns +++ b/pkg/sql/opt/exec/execbuilder/testdata/virtual_columns @@ -190,6 +190,10 @@ vectorized: true row 0, expr 0: 1 row 1, expr 0: 10 row 2, expr 0: 5 +· +index recommendations: 1 +1. type: index replacement + SQL commands: DROP INDEX t_idx@t_idx_v_idx; CREATE INDEX ON t_idx (v) STORING (b); subtest Insert @@ -1420,6 +1424,10 @@ vectorized: true estimated row count: 60 (missing stats) table: checks@checks_v_b_idx spans: /0/10-/0/16 /1/10-/1/16 /2/10-/2/16 /3/10-/3/16 +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON checks (b); subtest InvertedIndexes diff --git a/pkg/sql/opt/exec/execbuilder/testdata/window b/pkg/sql/opt/exec/execbuilder/testdata/window index e9450dff6b85..e77221ba8b46 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/window +++ b/pkg/sql/opt/exec/execbuilder/testdata/window @@ -301,6 +301,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v, d); query T EXPLAIN (TYPES) SELECT max(k), stddev(d) OVER (PARTITION BY v, 'a') FROM kv GROUP BY d, v ORDER BY 1 @@ -334,6 +338,10 @@ vectorized: true estimated row count: 1,000 (missing stats) table: kv@kv_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON kv (v, d); # Partition diff --git a/pkg/sql/opt/exec/execbuilder/testdata/with b/pkg/sql/opt/exec/execbuilder/testdata/with index ddc40d991eee..5eb4027e77d7 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/with +++ b/pkg/sql/opt/exec/execbuilder/testdata/with @@ -221,6 +221,10 @@ vectorized: true missing stats table: y@y_pkey spans: FULL SCAN +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON x (a); query T EXPLAIN @@ -235,3 +239,7 @@ vectorized: true │ └── • values size: 1 column, 3 rows +· +index recommendations: 1 +1. type: index creation + SQL command: CREATE INDEX ON y (a); diff --git a/pkg/sql/opt/exec/execbuilder/testdata/zigzag_join b/pkg/sql/opt/exec/execbuilder/testdata/zigzag_join index b263a2771964..6cc7e48a6b3d 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/zigzag_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/zigzag_join @@ -21,6 +21,12 @@ vectorized: true right table: t71093@c_idx right columns: (c) right fixed values: 1 column +· +index recommendations: 2 +1. type: index replacement + SQL commands: DROP INDEX t71093@a_idx; CREATE INDEX ON t71093 (a) STORING (b, c); +2. type: index creation + SQL command: CREATE INDEX ON t71093 (b) STORING (a, c); query T EXPLAIN SELECT count(*) FROM t71093 WHERE a = 0 AND c = 2 AND d = 3 @@ -38,6 +44,12 @@ vectorized: true right table: t71093@c_idx right columns: (c, d) right fixed values: 1 column +· +index recommendations: 2 +1. type: index replacement + SQL commands: DROP INDEX t71093@a_idx; CREATE INDEX ON t71093 (a) STORING (b, c, d); +2. type: index replacement + SQL commands: DROP INDEX t71093@c_idx; CREATE INDEX ON t71093 (c) STORING (a, d); query T EXPLAIN SELECT count(*) FROM t71093 WHERE a = 0 AND b = 1 AND c = 2 AND d = 3 @@ -55,6 +67,12 @@ vectorized: true right table: t71093@c_idx right columns: (c, d) right fixed values: 1 column +· +index recommendations: 2 +1. type: index replacement + SQL commands: DROP INDEX t71093@a_idx; CREATE INDEX ON t71093 (a) STORING (b, c, d); +2. type: index creation + SQL command: CREATE INDEX ON t71093 (b) STORING (a, c, d); # Make sure that the zigzag join is used in the regression test for #71271. statement ok @@ -74,3 +92,9 @@ vectorized: true right table: t71271@t71271_d_idx right columns: (d) right fixed values: 1 column +· +index recommendations: 2 +1. type: index replacement + SQL commands: DROP INDEX t71271@t71271_c_idx; CREATE INDEX ON t71271 (c) STORING (d); +2. type: index replacement + SQL commands: DROP INDEX t71271@t71271_d_idx; CREATE INDEX ON t71271 (d) STORING (c); diff --git a/pkg/sql/opt/indexrec/hypothetical_index.go b/pkg/sql/opt/indexrec/hypothetical_index.go index be2520ece10f..a5832ac09e9d 100644 --- a/pkg/sql/opt/indexrec/hypothetical_index.go +++ b/pkg/sql/opt/indexrec/hypothetical_index.go @@ -23,9 +23,9 @@ import ( ) // hypotheticalIndex is a dummy implementation of cat.Index, used with -// hypotheticalTable for index recommendations. +// HypotheticalTable for index recommendations. type hypotheticalIndex struct { - tab *hypotheticalTable + tab *HypotheticalTable name tree.Name // cols stores the index columns, in order. @@ -50,7 +50,7 @@ type hypotheticalIndex struct { var _ cat.Index = &hypotheticalIndex{} func (hi *hypotheticalIndex) init( - tab *hypotheticalTable, + tab *HypotheticalTable, name tree.Name, cols []cat.IndexColumn, indexOrd int, diff --git a/pkg/sql/opt/indexrec/hypothetical_table.go b/pkg/sql/opt/indexrec/hypothetical_table.go index 4869e2bea73b..93a390469ccb 100644 --- a/pkg/sql/opt/indexrec/hypothetical_table.go +++ b/pkg/sql/opt/indexrec/hypothetical_table.go @@ -19,11 +19,11 @@ import ( "github.com/cockroachdb/cockroach/pkg/util" ) -// BuildOptAndHypTableMaps builds a hypotheticalTable for each table in -// indexCandidates. This hypotheticalTable stores a hypothetical index for each +// BuildOptAndHypTableMaps builds a HypotheticalTable for each table in +// indexCandidates. This HypotheticalTable stores a hypothetical index for each // of the table's index candidates. The function returns a map from each table's // cat.StableID to its original sql.optTable, as well as a map from each table's -// cat.StableID to its constructed hypotheticalTable. These tables will be used +// cat.StableID to its constructed HypotheticalTable. These tables will be used // to update the table query metadata when making index recommendations. func BuildOptAndHypTableMaps( indexCandidates map[cat.Table][][]cat.IndexColumn, @@ -34,7 +34,7 @@ func BuildOptAndHypTableMaps( for t, indexes := range indexCandidates { hypIndexes := make([]hypotheticalIndex, 0, len(indexes)) - var hypTable hypotheticalTable + var hypTable HypotheticalTable hypTable.init(t, hypIndexes) for i, index := range indexes { @@ -58,18 +58,18 @@ func BuildOptAndHypTableMaps( return optTables, hypTables } -// hypotheticalTable is a wrapper around cat.Table, used for creating index +// HypotheticalTable is a wrapper around cat.Table, used for creating index // recommendations. The hypotheticalIndexes slice stores fake indexes that could // potentially speed up queries to this table. -type hypotheticalTable struct { +type HypotheticalTable struct { cat.Table primaryKeyColsOrdSet util.FastIntSet hypotheticalIndexes []hypotheticalIndex } -var _ cat.Table = &hypotheticalTable{} +var _ cat.Table = &HypotheticalTable{} -func (ht *hypotheticalTable) init(table cat.Table, hypIndexes []hypotheticalIndex) { +func (ht *HypotheticalTable) init(table cat.Table, hypIndexes []hypotheticalIndex) { ht.Table = table ht.hypotheticalIndexes = hypIndexes @@ -82,24 +82,24 @@ func (ht *hypotheticalTable) init(table cat.Table, hypIndexes []hypotheticalInde } // IndexCount is part of the cat.Table interface. -func (ht *hypotheticalTable) IndexCount() int { - // A hypotheticalTable stores the embedded table's primary index in addition +func (ht *HypotheticalTable) IndexCount() int { + // A HypotheticalTable stores the embedded table's primary index in addition // to its hypothetical indexes. return len(ht.hypotheticalIndexes) + 1 } // WritableIndexCount is part of the cat.Table interface. -func (ht *hypotheticalTable) WritableIndexCount() int { +func (ht *HypotheticalTable) WritableIndexCount() int { return ht.IndexCount() } // DeletableIndexCount is part of the cat.Table interface. -func (ht *hypotheticalTable) DeletableIndexCount() int { +func (ht *HypotheticalTable) DeletableIndexCount() int { return ht.IndexCount() } // Index is part of the cat.Table interface. -func (ht *hypotheticalTable) Index(i cat.IndexOrdinal) cat.Index { +func (ht *HypotheticalTable) Index(i cat.IndexOrdinal) cat.Index { if i == cat.PrimaryIndex { return ht.Table.Index(cat.PrimaryIndex) } @@ -107,10 +107,10 @@ func (ht *hypotheticalTable) Index(i cat.IndexOrdinal) cat.Index { } // existingRedundantIndex checks whether an index with the same explicit columns -// as the index argument is present in the hypotheticalTable's embedded table. +// as the index argument is present in the HypotheticalTable's embedded table. // If so, it returns the first instance of such an existing index. Otherwise, it // returns nil. -func (ht *hypotheticalTable) existingRedundantIndex(index *hypotheticalIndex) cat.Index { +func (ht *HypotheticalTable) existingRedundantIndex(index *hypotheticalIndex) cat.Index { for i, n := 0, ht.Table.IndexCount(); i < n; i++ { indexCols := index.cols existingIndex := ht.Table.Index(i) diff --git a/pkg/sql/opt/indexrec/index_candidate_set.go b/pkg/sql/opt/indexrec/index_candidate_set.go index c2a1d5959f78..f4cf21b25894 100644 --- a/pkg/sql/opt/indexrec/index_candidate_set.go +++ b/pkg/sql/opt/indexrec/index_candidate_set.go @@ -158,28 +158,37 @@ func (ics indexCandidateSet) addOrderingIndex(ordering opt.Ordering) { if len(ordering) == 0 { return } - columnList := make(opt.ColList, len(ordering)) - descList := make([]bool, len(ordering)) + columnList := make(opt.ColList, 0, len(ordering)) + descList := make([]bool, 0, len(ordering)) numTables := len(ics.md.AllTables()) reverseOrder := make(map[cat.Table]bool, numTables) - for i, orderingCol := range ordering { + for _, orderingCol := range ordering { colID := orderingCol.ID() - columnList[i] = colID - colTable := ics.md.Table(ics.md.ColumnMeta(colID).Table) + + tabID := ics.md.ColumnMeta(colID).Table + + // Do not add indexes on columns with no base table. + if tabID == 0 { + continue + } + + columnList = append(columnList, colID) + colTable := ics.md.Table(tabID) // Set descending bool for ordering column. if _, found := reverseOrder[colTable]; !found { reverseOrder[colTable] = orderingCol.Descending() } if reverseOrder[colTable] { - descList[i] = orderingCol.Ascending() + descList = append(descList, orderingCol.Ascending()) } else { - descList[i] = orderingCol.Descending() + descList = append(descList, orderingCol.Descending()) } } - - addMultiColumnIndex(columnList, descList, ics.md, ics.overallCandidates) + if len(columnList) > 0 { + addMultiColumnIndex(columnList, descList, ics.md, ics.overallCandidates) + } } // addJoinIndexes adds single-column indexes to joinCandidates for each outer @@ -312,10 +321,6 @@ func addSingleColumnIndex( md *opt.Metadata, indexCandidates map[cat.Table][][]cat.IndexColumn, ) { - // If the column is unknown, return. - if colID == 0 { - return - } columnMeta := md.ColumnMeta(colID) // If there's no base table for the column, return. @@ -339,6 +344,11 @@ func addIndexToCandidates( currTable cat.Table, indexCandidates map[cat.Table][][]cat.IndexColumn, ) { + // Do not add candidates from virtual tables. + if currTable.IsVirtualTable() { + return + } + // Do not add candidates that require inverted indexes. for _, indexCol := range newIndex { if !colinfo.ColumnTypeIsIndexable(indexCol.Column.DatumType()) { diff --git a/pkg/sql/opt/indexrec/index_candidate_set_test.go b/pkg/sql/opt/indexrec/index_candidate_set_test.go index 57bf188d8ae9..62fc6349fdbb 100644 --- a/pkg/sql/opt/indexrec/index_candidate_set_test.go +++ b/pkg/sql/opt/indexrec/index_candidate_set_test.go @@ -11,11 +11,11 @@ package indexrec import ( - "github.com/cockroachdb/cockroach/pkg/sql/types" "testing" "github.com/cockroachdb/cockroach/pkg/sql/opt/cat" "github.com/cockroachdb/cockroach/pkg/sql/opt/testutils/testcat" + "github.com/cockroachdb/cockroach/pkg/sql/types" ) func TestCopyIndexes(t *testing.T) { diff --git a/pkg/sql/opt/indexrec/index_recommendation_set.go b/pkg/sql/opt/indexrec/index_recommendation_set.go index 0e90fb5e8a23..ce7eef196e46 100644 --- a/pkg/sql/opt/indexrec/index_recommendation_set.go +++ b/pkg/sql/opt/indexrec/index_recommendation_set.go @@ -27,11 +27,11 @@ import ( // Note that because the index recommendation engine stores all table columns in // its hypothetical indexes when optimizing, and then prunes the stored columns // after, this may result in the best plan not being chosen. Meaning, a plan -// might not be recommended because the optimizer includes the overhead of -// scanning stored columns of an index, which results in plans with hypothetical -// indexes being more expensive and reduces their likelihood of being -// recommended. This is a tradeoff we accept in order to recommend STORING -// columns, as the difference in plan costs is not very significant. +// might not be chosen because the optimizer includes the overhead of scanning +// stored columns of an index, which results in plans with hypothetical indexes +// being more expensive and reduces their likelihood of being chosen. This is a +// tradeoff we accept in order to recommend STORING columns, as the difference +// in plan costs is not very significant. func FindIndexRecommendationSet(expr opt.Expr, md *opt.Metadata) IndexRecommendationSet { var recommendationSet IndexRecommendationSet recommendationSet.init(md) @@ -119,14 +119,14 @@ func (irs *IndexRecommendationSet) addIndexToRecommendationSet( } // Do not add real table indexes (non-hypothetical table indexes). switch hypTable := irs.md.TableMeta(tabID).Table.(type) { - case *hypotheticalTable: + case *HypotheticalTable: scannedColOrds := irs.getColOrdSet(scannedCols, tabID) // Try to find an identical existing index recommendation. for _, indexRec := range irs.indexRecs[hypTable] { index := indexRec.index if index.indexOrdinal == indexOrd { - // Update newStoredColOrds to include all stored column ordinals that - // are in scannedColOrds. + // Update indexRec.newStoredColOrds to include all stored column + // ordinals that are in scannedColOrds. indexRec.addStoredColOrds(scannedColOrds) return } @@ -139,20 +139,20 @@ func (irs *IndexRecommendationSet) addIndexToRecommendationSet( } } -// String returns the string index recommendation output that will be +// Output returns a string slice of index recommendation output that will be // displayed below the statement plan in EXPLAIN. -func (irs *IndexRecommendationSet) String() string { +func (irs *IndexRecommendationSet) Output() []string { indexRecCount := 0 for t := range irs.indexRecs { indexRecCount += len(irs.indexRecs[t]) } if indexRecCount == 0 { - return "" + return nil } - var sb strings.Builder - sb.WriteString( - fmt.Sprintf("\n\nindex recommendations: %d\n\n", indexRecCount), - ) + + outputRowCount := 2*len(irs.indexRecs) + 1 + output := make([]string, 0, outputRowCount) + output = append(output, fmt.Sprintf("index recommendations: %d", indexRecCount)) sortedTables := make([]cat.Table, 0, len(irs.indexRecs)) for t := range irs.indexRecs { @@ -166,6 +166,7 @@ func (irs *IndexRecommendationSet) String() string { for _, t := range sortedTables { indexes := irs.indexRecs[t] for _, indexRec := range indexes { + var sb strings.Builder recTypeStr := "index creation" if indexRec.existingIndex != nil { recTypeStr = "index replacement" @@ -175,9 +176,10 @@ func (irs *IndexRecommendationSet) String() string { indexCols := indexRec.indexColsString() storingClause := indexRec.storingClauseString() sb.WriteString(indexRec.indexRecommendationString(indexCols, storingClause)) + output = append(output, sb.String()) } } - return sb.String() + return output } // indexRecommendation stores the information pertaining to a single index @@ -202,7 +204,7 @@ type indexRecommendation struct { // init initializes an index recommendation. If there is an existingIndex with // the same explicit key columns, it is stored here. func (ir *indexRecommendation) init( - indexOrd int, hypTable *hypotheticalTable, scannedColOrds util.FastIntSet, + indexOrd int, hypTable *HypotheticalTable, scannedColOrds util.FastIntSet, ) { index := hypTable.Index(indexOrd).(*hypotheticalIndex) ir.index = index @@ -299,7 +301,7 @@ func (ir *indexRecommendation) indexRecommendationString(indexCols, storingClaus } createCmd := fmt.Sprintf( - "CREATE INDEX ON %s (%s)%s;\n\n", + "CREATE INDEX ON %s (%s)%s;", tableName.String(), indexCols, storingClause, diff --git a/pkg/sql/opt/indexrec/testdata/index-candidates-recommendations b/pkg/sql/opt/indexrec/testdata/index-candidates-recommendations index a8ed421f9586..b4b6132564bb 100644 --- a/pkg/sql/opt/indexrec/testdata/index-candidates-recommendations +++ b/pkg/sql/opt/indexrec/testdata/index-candidates-recommendations @@ -29,6 +29,16 @@ t4: (k) (k, f) +# Ensure that index candidates are not created for virtual tables. +index-candidates +SELECT * +FROM information_schema.schemata JOIN t1 +ON true +WHERE information_schema.schemata.SCHEMA_NAME='public' AND t1.k > 3 +---- +t1: + (k) + # Ensure that new indexes do not get recommended if an identical existing # index exists. diff --git a/pkg/sql/opt/metadata_test.go b/pkg/sql/opt/metadata_test.go index 554fad21c3b6..d0aefcd6682d 100644 --- a/pkg/sql/opt/metadata_test.go +++ b/pkg/sql/opt/metadata_test.go @@ -100,7 +100,7 @@ func TestMetadata(t *testing.T) { expr := &memo.ProjectExpr{} md.AddWithBinding(1, expr) var mdNew opt.Metadata - mdNew.CopyFrom(md, f.CopyScalarWithoutPlaceholders) + mdNew.CopyFrom(md, f.CopyWithoutAssigningPlaceholders) if mdNew.Schema(schID) != testCat.Schema() { t.Fatalf("unexpected schema") diff --git a/pkg/sql/opt/norm/factory.go b/pkg/sql/opt/norm/factory.go index 9c8f16157f02..1b699e968a3f 100644 --- a/pkg/sql/opt/norm/factory.go +++ b/pkg/sql/opt/norm/factory.go @@ -245,7 +245,7 @@ func (f *Factory) CopyAndReplace( // columns can keep the same ids they had in the "from" memo. Scalar // expressions in the metadata cannot have placeholders, so we simply copy // the expressions without replacement. - f.mem.Metadata().CopyFrom(from.Memo().Metadata(), f.CopyScalarWithoutPlaceholders) + f.mem.Metadata().CopyFrom(from.Memo().Metadata(), f.CopyWithoutAssigningPlaceholders) // Perform copy and replacement, and store result as the root of this // factory's memo. @@ -253,10 +253,10 @@ func (f *Factory) CopyAndReplace( f.Memo().SetRoot(to, fromProps) } -// CopyScalarWithoutPlaceholders returns a copy of the given scalar expression. +// CopyWithoutAssigningPlaceholders returns a copy of the given scalar expression. // It does not attempt to replace placeholders with values. -func (f *Factory) CopyScalarWithoutPlaceholders(e opt.Expr) opt.Expr { - return f.CopyAndReplaceDefault(e, f.CopyScalarWithoutPlaceholders) +func (f *Factory) CopyWithoutAssigningPlaceholders(e opt.Expr) opt.Expr { + return f.CopyAndReplaceDefault(e, f.CopyWithoutAssigningPlaceholders) } // AssignPlaceholders is used just before execution of a prepared Memo. It makes diff --git a/pkg/sql/opt/testutils/opttester/opt_tester.go b/pkg/sql/opt/testutils/opttester/opt_tester.go index 32f873d96993..6d6590675d9d 100644 --- a/pkg/sql/opt/testutils/opttester/opt_tester.go +++ b/pkg/sql/opt/testutils/opttester/opt_tester.go @@ -2066,13 +2066,14 @@ func (ot *OptTester) IndexRecommendations() string { _, hypTables := indexrec.BuildOptAndHypTableMaps(indexCandidates) optExpr, _ := ot.OptimizeWithTables(hypTables) - result := indexrec.FindIndexRecommendationSet(optExpr, optExpr.(memo.RelExpr).Memo().Metadata()) + md = optExpr.(memo.RelExpr).Memo().Metadata() + indexRecommendations := indexrec.FindIndexRecommendationSet(optExpr, md) + result := indexRecommendations.Output() - formattedResult := strings.Replace(strings.TrimSpace(result.String()), "\n\n", "\n", -1) - if formattedResult == "" { + if result == nil { return fmt.Sprintf("No index recommendations.\n--\nOptimal Plan.\n%s", ot.FormatExpr(optExpr)) } - return fmt.Sprintf("%s\n--\nOptimal Plan.\n%s", formattedResult, ot.FormatExpr(optExpr)) + return fmt.Sprintf("%s\n--\nOptimal Plan.\n%s", strings.Join(result, "\n"), ot.FormatExpr(optExpr)) } func (ot *OptTester) buildExpr(factory *norm.Factory) error { diff --git a/pkg/sql/opt_catalog.go b/pkg/sql/opt_catalog.go index a5784a315814..1b1c08f36482 100644 --- a/pkg/sql/opt_catalog.go +++ b/pkg/sql/opt_catalog.go @@ -28,6 +28,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/sql/catalog/resolver" "github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc" "github.com/cockroachdb/cockroach/pkg/sql/opt/cat" + "github.com/cockroachdb/cockroach/pkg/sql/opt/indexrec" "github.com/cockroachdb/cockroach/pkg/sql/parser" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgcode" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror" @@ -1150,6 +1151,19 @@ func (ot *optTable) lookupColumnOrdinal(colID descpb.ColumnID) (int, error) { "column [%d] does not exist", colID) } +// convertTableToOptTable converts a table to an *optTable. This is either an +// *optTable or a *indexrec.HypotheticalTable (which has an embedded *optTable). +func convertTableToOptTable(tab cat.Table) *optTable { + var optTab *optTable + switch t := tab.(type) { + case *optTable: + optTab = t + case *indexrec.HypotheticalTable: + optTab = t.Table.(*optTable) + } + return optTab +} + // CollectTypes is part of the cat.DataSource interface. func (ot *optTable) CollectTypes(ord int) (descpb.IDs, error) { col := ot.desc.AllColumns()[ord] @@ -1616,7 +1630,7 @@ func (u *optUniqueConstraint) ColumnOrdinal(tab cat.Table, i int) int { tab.ID(), u.table, )) } - optTab := tab.(*optTable) + optTab := convertTableToOptTable(tab) ord, _ := optTab.lookupColumnOrdinal(u.columns[i]) return ord } @@ -1686,7 +1700,7 @@ func (fk *optForeignKeyConstraint) OriginColumnOrdinal(originTable cat.Table, i )) } - tab := originTable.(*optTable) + tab := convertTableToOptTable(originTable) ord, _ := tab.lookupColumnOrdinal(fk.originColumns[i]) return ord } @@ -1699,7 +1713,7 @@ func (fk *optForeignKeyConstraint) ReferencedColumnOrdinal(referencedTable cat.T referencedTable.ID(), fk.referencedTable, )) } - tab := referencedTable.(*optTable) + tab := convertTableToOptTable(referencedTable) ord, _ := tab.lookupColumnOrdinal(fk.referencedColumns[i]) return ord } diff --git a/pkg/sql/plan_opt.go b/pkg/sql/plan_opt.go index ecc07f96dbdb..7549d4aa411d 100644 --- a/pkg/sql/plan_opt.go +++ b/pkg/sql/plan_opt.go @@ -22,6 +22,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/sql/opt/exec" "github.com/cockroachdb/cockroach/pkg/sql/opt/exec/execbuilder" "github.com/cockroachdb/cockroach/pkg/sql/opt/exec/explain" + "github.com/cockroachdb/cockroach/pkg/sql/opt/indexrec" "github.com/cockroachdb/cockroach/pkg/sql/opt/memo" "github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder" "github.com/cockroachdb/cockroach/pkg/sql/opt/xform" @@ -521,6 +522,15 @@ func (opc *optPlanningCtx) buildExecMemo(ctx context.Context) (_ *memo.Memo, _ e if err := bld.Build(); err != nil { return nil, err } + + // For index recommendations, after building we must interrupt the flow to + // find potential index candidates in the memo. + if _, isExplain := opc.p.stmt.AST.(*tree.Explain); isExplain { + if err := opc.makeQueryIndexRecommendation(); err != nil { + return nil, err + } + } + if _, isCanned := opc.p.stmt.AST.(*tree.CannedOptPlan); !isCanned { if _, err := opc.optimizer.Optimize(); err != nil { return nil, err @@ -648,3 +658,65 @@ func (opc *optPlanningCtx) runExecBuilder( func (p *planner) DecodeGist(gist string) ([]string, error) { return explain.DecodePlanGistToRows(gist, &p.optPlanningCtx.catalog) } + +// makeQueryIndexRecommendation builds a statement and walks through it to find +// potential index candidates. It then optimizes the statement with those +// indexes hypothetically added to the table. An index recommendation for the +// query is outputted based on which hypothetical indexes are helpful in the +// optimal plan. +func (opc *optPlanningCtx) makeQueryIndexRecommendation() error { + // Save the normalized memo created by the optbuilder. + savedMemo := opc.optimizer.DetachMemo() + + // Use the optimizer to fully normalize the memo. We need to do this before + // finding index candidates because the *memo.SortExpr from the sort enforcer + // is only added to the memo in this step. The sort expression is required to + // determine certain index candidates. + f := opc.optimizer.Factory() + f.FoldingControl().AllowStableFolds() + f.CopyAndReplace( + savedMemo.RootExpr().(memo.RelExpr), + savedMemo.RootProps(), + f.CopyWithoutAssigningPlaceholders, + ) + opc.optimizer.NotifyOnMatchedRule(func(ruleName opt.RuleName) bool { + return ruleName.IsNormalize() + }) + if _, err := opc.optimizer.Optimize(); err != nil { + return err + } + + // Walk through the fully normalized memo to determine index candidates and + // create hypothetical tables. + indexCandidates := indexrec.FindIndexCandidateSet(f.Memo().RootExpr(), f.Metadata()) + optTables, hypTables := indexrec.BuildOptAndHypTableMaps(indexCandidates) + + // Optimize with the saved memo and hypothetical tables. Walk through the + // optimal plan to determine index recommendations. + opc.optimizer.Init(f.EvalContext(), &opc.catalog) + f.CopyAndReplace( + savedMemo.RootExpr().(memo.RelExpr), + savedMemo.RootProps(), + f.CopyWithoutAssigningPlaceholders, + ) + opc.optimizer.Memo().Metadata().UpdateTableMeta(hypTables) + if _, err := opc.optimizer.Optimize(); err != nil { + return err + } + + indexRecommendations := indexrec.FindIndexRecommendationSet(f.Memo().RootExpr(), f.Metadata()) + opc.p.instrumentation.indexRecommendations = indexRecommendations.Output() + + // Re-initialize the optimizer (which also re-initializes the factory) and + // update the saved memo's metadata with the original table information. + // Prepare to re-optimize and create an executable plan. + opc.optimizer.Init(f.EvalContext(), &opc.catalog) + savedMemo.Metadata().UpdateTableMeta(optTables) + f.CopyAndReplace( + savedMemo.RootExpr().(memo.RelExpr), + savedMemo.RootProps(), + f.CopyWithoutAssigningPlaceholders, + ) + + return nil +} From 6fa365f7e6873ab875a79eea73169e1d383cdf13 Mon Sep 17 00:00:00 2001 From: Neha George Date: Fri, 3 Dec 2021 00:41:37 -0500 Subject: [PATCH 4/7] indexrec: refactor index recommendation output Previously, we manually formatted the string for the index recommendation's SQL output. This commit takes advantage of the existing functionality for formatting SQL statements, specifically `CREATE INDEX` and `DROP INDEX`. This will make it easier to add more types of index recommendations in the future. Release note: None --- pkg/sql/BUILD.bazel | 1 - .../opt/indexrec/index_recommendation_set.go | 89 ++++++++++--------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/pkg/sql/BUILD.bazel b/pkg/sql/BUILD.bazel index be9f7efc5923..dc51943c7878 100644 --- a/pkg/sql/BUILD.bazel +++ b/pkg/sql/BUILD.bazel @@ -330,7 +330,6 @@ go_library( "//pkg/sql/opt/exec/explain", "//pkg/sql/opt/indexrec", "//pkg/sql/opt/memo", - "//pkg/sql/opt/norm", "//pkg/sql/opt/optbuilder", "//pkg/sql/opt/xform", "//pkg/sql/optionalnodeliveness", diff --git a/pkg/sql/opt/indexrec/index_recommendation_set.go b/pkg/sql/opt/indexrec/index_recommendation_set.go index ce7eef196e46..4f38576e5d79 100644 --- a/pkg/sql/opt/indexrec/index_recommendation_set.go +++ b/pkg/sql/opt/indexrec/index_recommendation_set.go @@ -18,6 +18,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/sql/opt" "github.com/cockroachdb/cockroach/pkg/sql/opt/cat" "github.com/cockroachdb/cockroach/pkg/sql/opt/memo" + "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroachdb/cockroach/pkg/util" ) @@ -166,17 +167,17 @@ func (irs *IndexRecommendationSet) Output() []string { for _, t := range sortedTables { indexes := irs.indexRecs[t] for _, indexRec := range indexes { - var sb strings.Builder recTypeStr := "index creation" if indexRec.existingIndex != nil { recTypeStr = "index replacement" } - sb.WriteString(fmt.Sprintf("%d. type: %s", indexRecOrd, recTypeStr)) + indexCols := indexRec.indexCols() + storing := indexRec.storingColumns() + + indexRecType := fmt.Sprintf("%d. type: %s", indexRecOrd, recTypeStr) + indexRecSQL := indexRec.indexRecommendationString(indexCols, storing) + output = append(output, indexRecType, indexRecSQL) indexRecOrd++ - indexCols := indexRec.indexColsString() - storingClause := indexRec.storingClauseString() - sb.WriteString(indexRec.indexRecommendationString(indexCols, storingClause)) - output = append(output, sb.String()) } } return output @@ -246,67 +247,67 @@ func (ir *indexRecommendation) addStoredColOrds(scannedColOrds util.FastIntSet) ir.newStoredColOrds.UnionWith(scannedStoredColOrds) } -// indexColsString returns a string containing the explicit key columns of the -// index, used in indexRecommendationString. -func (ir *indexRecommendation) indexColsString() string { - indexCols := make([]string, len(ir.index.cols)) +// indexCols returns the explicit key columns of the index, used in +// indexRecommendationString. +func (ir *indexRecommendation) indexCols() []tree.IndexElem { + indexCols := make([]tree.IndexElem, len(ir.index.cols)) - for i, n := 0, len(ir.index.cols); i < n; i++ { - var indexColSb strings.Builder + for i := range ir.index.cols { indexCol := ir.index.Column(i) colName := indexCol.Column.ColName() - indexColSb.WriteString(colName.String()) + var direction tree.Direction if indexCol.Descending { - indexColSb.WriteString(" DESC") + direction = tree.Descending } - indexCols[i] = indexColSb.String() + indexCols[i] = tree.IndexElem{Column: colName, Direction: direction} } - return strings.Join(indexCols, ", ") + return indexCols } -// storingClauseString returns the STORING clause string output of an index -// recommendation. -func (ir *indexRecommendation) storingClauseString() string { - if ir.newStoredColOrds.Len() == 0 { - return "" - } - var storingSb strings.Builder - for i, col := range ir.newStoredColOrds.Ordered() { - colName := ir.index.tab.Column(col).ColName() - if i > 0 { - storingSb.WriteString(", ") - } - storingSb.WriteString(colName.String()) +// storingColumns returns the stored columns of an index recommendation, used in +// indexRecommendationString. +func (ir *indexRecommendation) storingColumns() []tree.Name { + storingLen := ir.newStoredColOrds.Len() + if storingLen == 0 { + return nil } - return " STORING (" + storingSb.String() + ")" + storingCols := make([]tree.Name, 0, storingLen) + ir.newStoredColOrds.ForEach(func(colOrd int) { + colName := ir.index.tab.Column(colOrd).ColName() + storingCols = append(storingCols, colName) + }) + return storingCols } // indexRecommendationString returns the string output for an index // recommendation, containing the SQL command(s) needed to follow this // recommendation. -func (ir *indexRecommendation) indexRecommendationString(indexCols, storingClause string) string { +func (ir *indexRecommendation) indexRecommendationString( + indexCols []tree.IndexElem, storing []tree.Name, +) string { var sb strings.Builder - tableName := ir.index.tab.Name() + tableName := tree.NewUnqualifiedTableName(ir.index.tab.Name()) if ir.existingIndex != nil { - sb.WriteString("\n SQL commands: ") - indexName := ir.existingIndex.Name() - dropCmd := fmt.Sprintf("DROP INDEX %s@%s; ", tableName.String(), indexName.String()) - sb.WriteString(dropCmd) + sb.WriteString(" SQL commands: ") + indexName := tree.UnrestrictedName(ir.existingIndex.Name()) + dropCmd := tree.DropIndex{ + IndexList: []*tree.TableIndexName{{Table: *tableName, Index: indexName}}, + } + sb.WriteString(dropCmd.String() + "; ") } else { - sb.WriteString("\n SQL command: ") + sb.WriteString(" SQL command: ") } - createCmd := fmt.Sprintf( - "CREATE INDEX ON %s (%s)%s;", - tableName.String(), - indexCols, - storingClause, - ) - sb.WriteString(createCmd) + createCmd := tree.CreateIndex{ + Table: *tableName, + Columns: indexCols, + Storing: storing, + } + sb.WriteString(createCmd.String() + ";") return sb.String() } From 08435c31bc071e950bff96706a6e951284879fb2 Mon Sep 17 00:00:00 2001 From: Marcus Gartner Date: Tue, 16 Nov 2021 10:36:13 -0500 Subject: [PATCH 5/7] sql: use Latest[Non]PrimaryIndexDescriptorVersion constants in more places These constants have been moved from tabledesc to descpb to avoid import cycles. Release note: None --- .../alter_web_sessions_create_indexes_test.go | 4 +-- ..._with_exponential_backoff_external_test.go | 4 +-- pkg/sql/alter_primary_key.go | 6 ++-- pkg/sql/catalog/descpb/structured.go | 12 +++++++ pkg/sql/catalog/systemschema/system.go | 32 +++++++++---------- pkg/sql/catalog/tabledesc/index_test.go | 5 ++- pkg/sql/catalog/tabledesc/structured.go | 8 ++--- pkg/sql/catalog/tabledesc/structured_test.go | 18 +++++------ pkg/sql/catalog/tabledesc/table.go | 14 -------- .../catalog/tabledesc/table_desc_builder.go | 8 ++--- pkg/sql/catalog/tabledesc/validate.go | 4 +-- pkg/sql/catalog/tabledesc/validate_test.go | 18 +++++------ pkg/sql/create_index.go | 2 +- pkg/sql/create_sequence.go | 2 +- pkg/sql/create_table.go | 2 +- pkg/sql/indexbackfiller_test.go | 4 +-- pkg/sql/opt/indexrec/BUILD.bazel | 1 - pkg/sql/opt/indexrec/hypothetical_index.go | 3 +- pkg/sql/opt/testutils/testcat/create_table.go | 2 +- pkg/sql/opt/testutils/testcat/test_catalog.go | 2 +- pkg/sql/randgen/mutator.go | 2 +- pkg/sql/rowenc/index_encoding.go | 4 +-- pkg/sql/rowenc/index_encoding_test.go | 4 +-- .../scexec/executor_external_test.go | 2 +- .../scexec/scmutationexec/scmutationexec.go | 4 +-- pkg/sql/table_test.go | 14 ++++---- 26 files changed, 88 insertions(+), 93 deletions(-) diff --git a/pkg/migration/migrations/alter_web_sessions_create_indexes_test.go b/pkg/migration/migrations/alter_web_sessions_create_indexes_test.go index cc9198ce406e..3b32caea865e 100644 --- a/pkg/migration/migrations/alter_web_sessions_create_indexes_test.go +++ b/pkg/migration/migrations/alter_web_sessions_create_indexes_test.go @@ -160,7 +160,7 @@ func getDeprecatedWebSessionsDescriptor() *descpb.TableDescriptor { KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{5}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, { Name: "web_sessions_createdAt_idx", @@ -170,7 +170,7 @@ func getDeprecatedWebSessionsDescriptor() *descpb.TableDescriptor { KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{4}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, }, NextIndexID: 4, diff --git a/pkg/migration/migrations/retry_jobs_with_exponential_backoff_external_test.go b/pkg/migration/migrations/retry_jobs_with_exponential_backoff_external_test.go index 93acf2c321d9..3b481ddb33de 100644 --- a/pkg/migration/migrations/retry_jobs_with_exponential_backoff_external_test.go +++ b/pkg/migration/migrations/retry_jobs_with_exponential_backoff_external_test.go @@ -616,7 +616,7 @@ func getDeprecatedJobsDescriptor() *descpb.TableDescriptor { KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{2, 3}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, { Name: "jobs_created_by_type_created_by_id_idx", @@ -628,7 +628,7 @@ func getDeprecatedJobsDescriptor() *descpb.TableDescriptor { StoreColumnIDs: []descpb.ColumnID{2}, StoreColumnNames: []string{"status"}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, }, NextIndexID: 4, diff --git a/pkg/sql/alter_primary_key.go b/pkg/sql/alter_primary_key.go index 4a0472a77198..5ef1d072239d 100644 --- a/pkg/sql/alter_primary_key.go +++ b/pkg/sql/alter_primary_key.go @@ -165,7 +165,7 @@ func (p *planner) AlterPrimaryKey( CreatedExplicitly: true, EncodingType: descpb.PrimaryIndexEncoding, Type: descpb.IndexDescriptor_FORWARD, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, } // If the new index is requested to be sharded, set up the index descriptor @@ -339,7 +339,7 @@ func (p *planner) AlterPrimaryKey( newUniqueIdx.CompositeColumnIDs = nil newUniqueIdx.KeyColumnIDs = nil // Set correct version and encoding type. - newUniqueIdx.Version = descpb.StrictIndexColumnIDGuaranteesVersion + newUniqueIdx.Version = descpb.LatestNonPrimaryIndexDescriptorVersion newUniqueIdx.EncodingType = descpb.SecondaryIndexEncoding if err := addIndexMutationWithSpecificPrimaryKey(ctx, tableDesc, &newUniqueIdx, newPrimaryIndexDesc); err != nil { return err @@ -447,7 +447,7 @@ func (p *planner) AlterPrimaryKey( } newIndex.Name = tabledesc.GenerateUniqueName(basename, nameExists) - newIndex.Version = descpb.StrictIndexColumnIDGuaranteesVersion + newIndex.Version = descpb.LatestNonPrimaryIndexDescriptorVersion newIndex.EncodingType = descpb.SecondaryIndexEncoding if err := addIndexMutationWithSpecificPrimaryKey(ctx, tableDesc, &newIndex, newPrimaryIndexDesc); err != nil { return err diff --git a/pkg/sql/catalog/descpb/structured.go b/pkg/sql/catalog/descpb/structured.go index 81fb9def2639..252754d696b8 100644 --- a/pkg/sql/catalog/descpb/structured.go +++ b/pkg/sql/catalog/descpb/structured.go @@ -119,6 +119,18 @@ const ( // these were implicitly derived based on the set of non-virtual columns in // the table. PrimaryIndexWithStoredColumnsVersion + + // LatestPrimaryIndexDescriptorVersion is the latest index descriptor + // version value for primary indexes, and so will be found in all + // newly-created primary indexes. + // This property is tested by TestLatestIndexDescriptorVersionValues. + LatestPrimaryIndexDescriptorVersion = PrimaryIndexWithStoredColumnsVersion + + // LatestNonPrimaryIndexDescriptorVersion is the latest index descriptor + // version value for non-primary indexes, and so will be found in all + // newly-created secondary indexes, as well as index mutations. + // this property is tested by TestLatestIndexDescriptorVersionValues. + LatestNonPrimaryIndexDescriptorVersion = StrictIndexColumnIDGuaranteesVersion ) // ColumnID is a custom type for ColumnDescriptor IDs. diff --git a/pkg/sql/catalog/systemschema/system.go b/pkg/sql/catalog/systemschema/system.go index d172d7b5111a..3086b07a9123 100644 --- a/pkg/sql/catalog/systemschema/system.go +++ b/pkg/sql/catalog/systemschema/system.go @@ -1148,7 +1148,7 @@ var ( KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{2, 3}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, descpb.IndexDescriptor{ Name: "jobs_created_by_type_created_by_id_idx", @@ -1160,7 +1160,7 @@ var ( StoreColumnIDs: []descpb.ColumnID{2}, StoreColumnNames: []string{"status"}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, descpb.IndexDescriptor{ Name: "jobs_run_stats_idx", @@ -1172,7 +1172,7 @@ var ( StoreColumnNames: []string{"last_run", "num_runs", "claim_instance_id"}, StoreColumnIDs: []descpb.ColumnID{11, 10, 9}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, Predicate: JobsRunStatsIdxPredicate, }, )) @@ -1219,7 +1219,7 @@ var ( KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{5}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, descpb.IndexDescriptor{ Name: "web_sessions_createdAt_idx", @@ -1229,7 +1229,7 @@ var ( KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{4}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, descpb.IndexDescriptor{ Name: "web_sessions_revokedAt_idx", @@ -1239,7 +1239,7 @@ var ( KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{6}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, descpb.IndexDescriptor{ Name: "web_sessions_lastUsedAt_idx", @@ -1249,7 +1249,7 @@ var ( KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{7}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, )) @@ -1374,7 +1374,7 @@ var ( KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{1}, KeySuffixColumnIDs: []descpb.ColumnID{2}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, descpb.IndexDescriptor{ Name: "role_members_member_idx", @@ -1384,7 +1384,7 @@ var ( KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{2}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, )) @@ -1746,7 +1746,7 @@ var ( KeyColumnIDs: []descpb.ColumnID{2, 1}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, StoreColumnIDs: []descpb.ColumnID{3, 6, 7}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, )) @@ -1822,7 +1822,7 @@ var ( KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeyColumnIDs: []descpb.ColumnID{5}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, )) @@ -1982,7 +1982,7 @@ var ( descpb.IndexDescriptor_ASC, }, KeyColumnIDs: []descpb.ColumnID{11, 1, 2, 3, 4, 5, 6}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, Sharded: descpb.ShardedDescriptor{ IsSharded: true, Name: "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8", @@ -2011,7 +2011,7 @@ var ( }, KeyColumnIDs: []descpb.ColumnID{2, 3}, KeySuffixColumnIDs: []descpb.ColumnID{11, 1, 4, 5, 6}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, ), func(tbl *descpb.TableDescriptor) { @@ -2082,7 +2082,7 @@ var ( descpb.IndexDescriptor_ASC, }, KeyColumnIDs: []descpb.ColumnID{8, 1, 2, 3, 4}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, Sharded: descpb.ShardedDescriptor{ IsSharded: true, Name: "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8", @@ -2107,7 +2107,7 @@ var ( }, KeyColumnIDs: []descpb.ColumnID{2}, KeySuffixColumnIDs: []descpb.ColumnID{8, 1, 3, 4}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, ), func(tbl *descpb.TableDescriptor) { @@ -2207,7 +2207,7 @@ var ( descpb.IndexDescriptor_ASC, }, KeyColumnIDs: []descpb.ColumnID{1, 2}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, )) diff --git a/pkg/sql/catalog/tabledesc/index_test.go b/pkg/sql/catalog/tabledesc/index_test.go index 9bf96b5fab7c..91d16fe45fc9 100644 --- a/pkg/sql/catalog/tabledesc/index_test.go +++ b/pkg/sql/catalog/tabledesc/index_test.go @@ -27,7 +27,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/sql/catalog/catalogkeys" "github.com/cockroachdb/cockroach/pkg/sql/catalog/catalogkv" "github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc" "github.com/cockroachdb/cockroach/pkg/testutils/serverutils" "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" "github.com/cockroachdb/cockroach/pkg/util/hlc" @@ -403,8 +402,8 @@ func TestLatestIndexDescriptorVersionValues(t *testing.T) { defer leaktest.AfterTest(t)() ctx := context.Background() - const vp = tabledesc.LatestPrimaryIndexDescriptorVersion - const vnp = tabledesc.LatestNonPrimaryIndexDescriptorVersion + const vp = descpb.LatestPrimaryIndexDescriptorVersion + const vnp = descpb.LatestNonPrimaryIndexDescriptorVersion // Create a test cluster that will be used to create all kinds of indexes. // We make it hang while finalizing an ALTER PRIMARY KEY to cover the edge diff --git a/pkg/sql/catalog/tabledesc/structured.go b/pkg/sql/catalog/tabledesc/structured.go index 13b7be8a023b..8346de66bc23 100644 --- a/pkg/sql/catalog/tabledesc/structured.go +++ b/pkg/sql/catalog/tabledesc/structured.go @@ -1116,8 +1116,8 @@ func (desc *Mutable) AddPrimaryIndex(idx descpb.IndexDescriptor) error { idx.Name = PrimaryKeyIndexName(desc.Name) } idx.EncodingType = descpb.PrimaryIndexEncoding - if idx.Version < descpb.PrimaryIndexWithStoredColumnsVersion { - idx.Version = descpb.PrimaryIndexWithStoredColumnsVersion + if idx.Version < descpb.LatestPrimaryIndexDescriptorVersion { + idx.Version = descpb.LatestPrimaryIndexDescriptorVersion // Populate store columns. names := make(map[string]struct{}) for _, name := range idx.KeyColumnNames { @@ -1696,8 +1696,8 @@ func (desc *Mutable) MakeMutationComplete(m descpb.DescriptorMutation) error { } else { primaryIndex.Name = args.NewPrimaryIndexName } - if primaryIndex.Version == descpb.StrictIndexColumnIDGuaranteesVersion { - primaryIndex.Version = descpb.PrimaryIndexWithStoredColumnsVersion + if primaryIndex.Version == descpb.LatestNonPrimaryIndexDescriptorVersion { + primaryIndex.Version = descpb.LatestPrimaryIndexDescriptorVersion } desc.SetPrimaryIndex(primaryIndex) } diff --git a/pkg/sql/catalog/tabledesc/structured_test.go b/pkg/sql/catalog/tabledesc/structured_test.go index ec9399c54851..c2278c10ec7c 100644 --- a/pkg/sql/catalog/tabledesc/structured_test.go +++ b/pkg/sql/catalog/tabledesc/structured_test.go @@ -66,7 +66,7 @@ func TestAllocateIDs(t *testing.T) { idx := makeIndexDescriptor("c", []string{"a", "b"}) idx.StoreColumnNames = []string{"c"} idx.EncodingType = descpb.PrimaryIndexEncoding - idx.Version = descpb.PrimaryIndexWithStoredColumnsVersion + idx.Version = descpb.LatestPrimaryIndexDescriptorVersion return idx }(), Indexes: []descpb.IndexDescriptor{ @@ -111,20 +111,20 @@ func TestAllocateIDs(t *testing.T) { StoreColumnIDs: descpb.ColumnIDs{3}, StoreColumnNames: []string{"c"}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion}, + Version: descpb.LatestPrimaryIndexDescriptorVersion}, Indexes: []descpb.IndexDescriptor{ {ID: 2, Name: "d", KeyColumnIDs: []descpb.ColumnID{2, 1}, KeyColumnNames: []string{"b", "a"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion}, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion}, {ID: 3, Name: "e", KeyColumnIDs: []descpb.ColumnID{2}, KeyColumnNames: []string{"b"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, KeySuffixColumnIDs: []descpb.ColumnID{1}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion}, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion}, {ID: 4, Name: "f", KeyColumnIDs: []descpb.ColumnID{3}, KeyColumnNames: []string{"c"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.StrictIndexColumnIDGuaranteesVersion}, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion}, }, Privileges: descpb.NewBasePrivilegeDescriptor(security.AdminRoleName()), NextColumnID: 4, @@ -371,7 +371,7 @@ func TestMaybeUpgradeIndexFormatVersion(t *testing.T) { KeyColumnNames: []string{"foo", "bar"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, Privileges: descpb.NewBasePrivilegeDescriptor(security.RootUserName()), }, @@ -526,7 +526,7 @@ func TestMaybeUpgradeIndexFormatVersion(t *testing.T) { KeyColumnNames: []string{"foo", "bar"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, Indexes: []descpb.IndexDescriptor{ { @@ -536,7 +536,7 @@ func TestMaybeUpgradeIndexFormatVersion(t *testing.T) { KeyColumnNames: []string{"foo"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.SecondaryIndexEncoding, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, { ID: descpb.IndexID(3), @@ -545,7 +545,7 @@ func TestMaybeUpgradeIndexFormatVersion(t *testing.T) { KeyColumnNames: []string{"bar"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.SecondaryIndexEncoding, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, }, Privileges: descpb.NewBasePrivilegeDescriptor(security.RootUserName()), diff --git a/pkg/sql/catalog/tabledesc/table.go b/pkg/sql/catalog/tabledesc/table.go index a64b06a61e2d..2b59e2ebbe73 100644 --- a/pkg/sql/catalog/tabledesc/table.go +++ b/pkg/sql/catalog/tabledesc/table.go @@ -576,17 +576,3 @@ func PrimaryKeyString(desc catalog.TableDescriptor) string { } return f.CloseAndGetString() } - -const ( - // LatestPrimaryIndexDescriptorVersion is the latest index descriptor version - // value for primary indexes, and so will be found in all newly-created - // primary indexes. - // This property is tested by TestLatestIndexDescriptorVersionValues. - LatestPrimaryIndexDescriptorVersion descpb.IndexDescriptorVersion = descpb.PrimaryIndexWithStoredColumnsVersion - - // LatestNonPrimaryIndexDescriptorVersion is the latest index descriptor - // version value for non-primary indexes, and so will be found in all - // newly-created secondary indexes, as well as index mutations. - // This property is tested by TestLatestIndexDescriptorVersionValues. - LatestNonPrimaryIndexDescriptorVersion descpb.IndexDescriptorVersion = descpb.StrictIndexColumnIDGuaranteesVersion -) diff --git a/pkg/sql/catalog/tabledesc/table_desc_builder.go b/pkg/sql/catalog/tabledesc/table_desc_builder.go index 7195d1435fa4..fdd7de71a7af 100644 --- a/pkg/sql/catalog/tabledesc/table_desc_builder.go +++ b/pkg/sql/catalog/tabledesc/table_desc_builder.go @@ -502,7 +502,7 @@ func upgradeToFamilyFormatVersion(desc *descpb.TableDescriptor) { } // maybeUpgradePrimaryIndexFormatVersion tries to promote a primary index to -// version descpb.PrimaryIndexWithStoredColumnsVersion whenever possible. +// version LatestPrimaryIndexDescriptorVersion whenever possible. func maybeUpgradePrimaryIndexFormatVersion(desc *descpb.TableDescriptor) (hasChanged bool) { // Always set the correct encoding type for the primary index. desc.PrimaryIndex.EncodingType = descpb.PrimaryIndexEncoding @@ -547,12 +547,12 @@ func maybeUpgradePrimaryIndexFormatVersion(desc *descpb.TableDescriptor) (hasCha } desc.PrimaryIndex.StoreColumnIDs = newStoreColumnIDs desc.PrimaryIndex.StoreColumnNames = newStoreColumnNames - desc.PrimaryIndex.Version = descpb.PrimaryIndexWithStoredColumnsVersion + desc.PrimaryIndex.Version = descpb.LatestPrimaryIndexDescriptorVersion return true } // maybeUpgradeSecondaryIndexFormatVersion tries to promote a secondary index to -// version descpb.StrictIndexColumnIDGuaranteesVersion whenever possible. +// version LatestNonPrimaryIndexDescriptorVersion whenever possible. func maybeUpgradeSecondaryIndexFormatVersion(idx *descpb.IndexDescriptor) (hasChanged bool) { switch idx.Version { case descpb.SecondaryIndexFamilyFormatVersion: @@ -575,7 +575,7 @@ func maybeUpgradeSecondaryIndexFormatVersion(idx *descpb.IndexDescriptor) (hasCh if set.Contains(0) { return false } - idx.Version = descpb.StrictIndexColumnIDGuaranteesVersion + idx.Version = descpb.LatestNonPrimaryIndexDescriptorVersion return true } diff --git a/pkg/sql/catalog/tabledesc/validate.go b/pkg/sql/catalog/tabledesc/validate.go index 24724561eee2..74552070e16a 100644 --- a/pkg/sql/catalog/tabledesc/validate.go +++ b/pkg/sql/catalog/tabledesc/validate.go @@ -879,9 +879,9 @@ func (desc *wrapper) validateTableIndexes(columnNames map[string]descpb.ColumnID } } if idx.Primary() { - if idx.GetVersion() != descpb.PrimaryIndexWithStoredColumnsVersion { + if idx.GetVersion() != descpb.LatestPrimaryIndexDescriptorVersion { return errors.AssertionFailedf("primary index %q has invalid version %d, expected %d", - idx.GetName(), idx.GetVersion(), descpb.PrimaryIndexWithStoredColumnsVersion) + idx.GetName(), idx.GetVersion(), descpb.LatestPrimaryIndexDescriptorVersion) } if idx.IndexDesc().EncodingType != descpb.PrimaryIndexEncoding { return errors.AssertionFailedf("primary index %q has invalid encoding type %d in proto, expected %d", diff --git a/pkg/sql/catalog/tabledesc/validate_test.go b/pkg/sql/catalog/tabledesc/validate_test.go index c7e2eecc36f1..ab00ef2e0229 100644 --- a/pkg/sql/catalog/tabledesc/validate_test.go +++ b/pkg/sql/catalog/tabledesc/validate_test.go @@ -661,7 +661,7 @@ func TestValidateTableDesc(t *testing.T) { ID: 1, Name: "primary", KeyColumnIDs: []descpb.ColumnID{1}, KeyColumnNames: []string{"bar"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, Indexes: []descpb.IndexDescriptor{ {ID: 2, Name: "bar"}, @@ -724,7 +724,7 @@ func TestValidateTableDesc(t *testing.T) { KeyColumnIDs: []descpb.ColumnID{1}, KeyColumnNames: []string{"bar"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, Indexes: []descpb.IndexDescriptor{ {ID: 2, Name: "bar", KeyColumnIDs: []descpb.ColumnID{1}, @@ -752,7 +752,7 @@ func TestValidateTableDesc(t *testing.T) { KeyColumnNames: []string{"bar"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, Indexes: []descpb.IndexDescriptor{ {ID: 1, Name: "blah", KeyColumnIDs: []descpb.ColumnID{1}, @@ -868,7 +868,7 @@ func TestValidateTableDesc(t *testing.T) { KeyColumnIDs: []descpb.ColumnID{1}, KeyColumnNames: []string{"bar"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, ForeignKey: descpb.ForeignKeyReference{Table: 123, Index: 456}, }, NextColumnID: 2, @@ -896,7 +896,7 @@ func TestValidateTableDesc(t *testing.T) { NumColumns: 1, }, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, NextColumnID: 2, NextFamilyID: 1, @@ -927,7 +927,7 @@ func TestValidateTableDesc(t *testing.T) { StoreColumnNames: []string{"crdb_internal_bar_shard_5"}, StoreColumnIDs: []descpb.ColumnID{2}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, Indexes: []descpb.IndexDescriptor{ {ID: 2, Name: "foo_crdb_internal_bar_shard_5_bar_idx", @@ -1089,7 +1089,7 @@ func TestValidateTableDesc(t *testing.T) { KeyColumnNames: []string{"c1"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, Indexes: []descpb.IndexDescriptor{ {ID: 2, Name: "sec", KeyColumnIDs: []descpb.ColumnID{2}, @@ -1121,7 +1121,7 @@ func TestValidateTableDesc(t *testing.T) { KeyColumnNames: []string{"c1"}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, Indexes: []descpb.IndexDescriptor{ {ID: 2, Name: "sec", KeyColumnIDs: []descpb.ColumnID{2}, @@ -1129,7 +1129,7 @@ func TestValidateTableDesc(t *testing.T) { KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, StoreColumnNames: []string{"c2"}, StoreColumnIDs: []descpb.ColumnID{2}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, }, NextColumnID: 3, diff --git a/pkg/sql/create_index.go b/pkg/sql/create_index.go index 9f6a8f06e783..f4f724d161d3 100644 --- a/pkg/sql/create_index.go +++ b/pkg/sql/create_index.go @@ -639,7 +639,7 @@ func (n *createIndexNode) startExec(params runParams) error { telemetry.Inc(sqltelemetry.SecondaryIndexColumnFamiliesCounter) } - indexDesc.Version = descpb.StrictIndexColumnIDGuaranteesVersion + indexDesc.Version = descpb.LatestNonPrimaryIndexDescriptorVersion if n.n.PartitionByIndex != nil && n.tableDesc.GetLocalityConfig() != nil { return pgerror.New( diff --git a/pkg/sql/create_sequence.go b/pkg/sql/create_sequence.go index ed5ee3a106df..449cf27447e9 100644 --- a/pkg/sql/create_sequence.go +++ b/pkg/sql/create_sequence.go @@ -206,7 +206,7 @@ func NewSequenceTableDesc( KeyColumnNames: []string{tabledesc.SequenceColumnName}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }) desc.Families = []descpb.ColumnFamilyDescriptor{ { diff --git a/pkg/sql/create_table.go b/pkg/sql/create_table.go index bb70af9395a0..6fa42c614e34 100644 --- a/pkg/sql/create_table.go +++ b/pkg/sql/create_table.go @@ -1278,7 +1278,7 @@ func NewTableDesc( return nil, err } - indexEncodingVersion := descpb.StrictIndexColumnIDGuaranteesVersion + indexEncodingVersion := descpb.LatestNonPrimaryIndexDescriptorVersion isRegionalByRow := n.Locality != nil && n.Locality.LocalityLevel == tree.LocalityLevelRow var partitionAllBy *tree.PartitionBy diff --git a/pkg/sql/indexbackfiller_test.go b/pkg/sql/indexbackfiller_test.go index 35d73d63e876..ae389610601a 100644 --- a/pkg/sql/indexbackfiller_test.go +++ b/pkg/sql/indexbackfiller_test.go @@ -234,7 +234,7 @@ INSERT INTO foo VALUES (1, 2), (2, 3), (3, 4); Name: "virtual_column_backed_index", ID: mut.NextIndexID, Unique: true, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, KeyColumnNames: []string{ mut.Columns[2].Name, }, @@ -311,7 +311,7 @@ INSERT INTO foo VALUES (1), (10), (100); Name: "new_primary_index", ID: mut.NextIndexID, Unique: true, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, KeyColumnNames: []string{ mut.Columns[0].Name, }, diff --git a/pkg/sql/opt/indexrec/BUILD.bazel b/pkg/sql/opt/indexrec/BUILD.bazel index df66b0f00d20..6958303d4422 100644 --- a/pkg/sql/opt/indexrec/BUILD.bazel +++ b/pkg/sql/opt/indexrec/BUILD.bazel @@ -15,7 +15,6 @@ go_library( "//pkg/geo/geoindex", "//pkg/roachpb:with-mocks", "//pkg/sql/catalog/descpb", - "//pkg/sql/catalog/tabledesc", "//pkg/sql/opt", "//pkg/sql/opt/cat", "//pkg/sql/opt/memo", diff --git a/pkg/sql/opt/indexrec/hypothetical_index.go b/pkg/sql/opt/indexrec/hypothetical_index.go index be2520ece10f..5fd87c01aba1 100644 --- a/pkg/sql/opt/indexrec/hypothetical_index.go +++ b/pkg/sql/opt/indexrec/hypothetical_index.go @@ -15,7 +15,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/geo/geoindex" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc" "github.com/cockroachdb/cockroach/pkg/sql/opt/cat" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroachdb/cockroach/pkg/util" @@ -197,7 +196,7 @@ func (hi *hypotheticalIndex) GeoConfig() *geoindex.Config { func (hi *hypotheticalIndex) Version() descpb.IndexDescriptorVersion { // Return the latest version for non-primary indexes, since hypothetical // indexes are not primary indexes. - return tabledesc.LatestNonPrimaryIndexDescriptorVersion + return descpb.LatestNonPrimaryIndexDescriptorVersion } // PartitionCount is part of the cat.Index interface. diff --git a/pkg/sql/opt/testutils/testcat/create_table.go b/pkg/sql/opt/testutils/testcat/create_table.go index 05ed7380e1a4..bd4b45e1da41 100644 --- a/pkg/sql/opt/testutils/testcat/create_table.go +++ b/pkg/sql/opt/testutils/testcat/create_table.go @@ -685,7 +685,7 @@ func (tt *Table) addColumn(def *tree.ColumnTableDef) { } func (tt *Table) addIndex(def *tree.IndexTableDef, typ indexType) *Index { - return tt.addIndexWithVersion(def, typ, descpb.StrictIndexColumnIDGuaranteesVersion) + return tt.addIndexWithVersion(def, typ, descpb.LatestNonPrimaryIndexDescriptorVersion) } func (tt *Table) addIndexWithVersion( diff --git a/pkg/sql/opt/testutils/testcat/test_catalog.go b/pkg/sql/opt/testutils/testcat/test_catalog.go index 26951cc5929e..567bb603d981 100644 --- a/pkg/sql/opt/testutils/testcat/test_catalog.go +++ b/pkg/sql/opt/testutils/testcat/test_catalog.go @@ -350,7 +350,7 @@ func (tc *Catalog) ExecuteMultipleDDL(sql string) error { // ExecuteDDL parses the given DDL SQL statement and creates objects in the test // catalog. This is used to test without spinning up a cluster. func (tc *Catalog) ExecuteDDL(sql string) (string, error) { - return tc.ExecuteDDLWithIndexVersion(sql, descpb.StrictIndexColumnIDGuaranteesVersion) + return tc.ExecuteDDLWithIndexVersion(sql, descpb.LatestNonPrimaryIndexDescriptorVersion) } // ExecuteDDLWithIndexVersion parses the given DDL SQL statement and creates diff --git a/pkg/sql/randgen/mutator.go b/pkg/sql/randgen/mutator.go index 08b41f7078bc..e6afae82817e 100644 --- a/pkg/sql/randgen/mutator.go +++ b/pkg/sql/randgen/mutator.go @@ -361,7 +361,7 @@ func encodeInvertedIndexHistogramUpperBounds(colType *types.T, val tree.Datum) ( case types.GeographyFamily: keys, err = rowenc.EncodeGeoInvertedIndexTableKeys(val, nil, *geoindex.DefaultGeographyIndexConfig()) default: - keys, err = rowenc.EncodeInvertedIndexTableKeys(val, nil, descpb.StrictIndexColumnIDGuaranteesVersion) + keys, err = rowenc.EncodeInvertedIndexTableKeys(val, nil, descpb.LatestNonPrimaryIndexDescriptorVersion) } if err != nil { diff --git a/pkg/sql/rowenc/index_encoding.go b/pkg/sql/rowenc/index_encoding.go index da745e967b32..a62e7480b6df 100644 --- a/pkg/sql/rowenc/index_encoding.go +++ b/pkg/sql/rowenc/index_encoding.go @@ -751,7 +751,7 @@ func encodeContainingArrayInvertedIndexSpans( return &inverted.SpanExpression{Tight: true, Unique: true}, nil } - keys, err := encodeArrayInvertedIndexTableKeys(val, inKey, descpb.StrictIndexColumnIDGuaranteesVersion, false /* excludeNulls */) + keys, err := encodeArrayInvertedIndexTableKeys(val, inKey, descpb.LatestNonPrimaryIndexDescriptorVersion, false /* excludeNulls */) if err != nil { return nil, err } @@ -794,7 +794,7 @@ func encodeContainedArrayInvertedIndexSpans( // We always exclude nulls from the list of keys when evaluating <@. // This is because an expression like ARRAY[NULL] <@ ARRAY[NULL] is false, // since NULL in SQL represents an unknown value. - keys, err := encodeArrayInvertedIndexTableKeys(val, inKey, descpb.StrictIndexColumnIDGuaranteesVersion, true /* excludeNulls */) + keys, err := encodeArrayInvertedIndexTableKeys(val, inKey, descpb.LatestNonPrimaryIndexDescriptorVersion, true /* excludeNulls */) if err != nil { return nil, err } diff --git a/pkg/sql/rowenc/index_encoding_test.go b/pkg/sql/rowenc/index_encoding_test.go index cac9dc918e2e..06630afeab52 100644 --- a/pkg/sql/rowenc/index_encoding_test.go +++ b/pkg/sql/rowenc/index_encoding_test.go @@ -429,7 +429,7 @@ func TestEncodeContainingArrayInvertedIndexSpans(t *testing.T) { } runTest := func(left, right tree.Datum, expected, expectUnique bool) { - keys, err := EncodeInvertedIndexTableKeys(left, nil, descpb.StrictIndexColumnIDGuaranteesVersion) + keys, err := EncodeInvertedIndexTableKeys(left, nil, descpb.LatestNonPrimaryIndexDescriptorVersion) require.NoError(t, err) invertedExpr, err := EncodeContainingInvertedIndexSpans(&evalCtx, right) @@ -564,7 +564,7 @@ func TestEncodeContainedArrayInvertedIndexSpans(t *testing.T) { } runTest := func(indexedValue, value tree.Datum, expectContainsKeys, expected, expectUnique bool) { - keys, err := EncodeInvertedIndexTableKeys(indexedValue, nil, descpb.StrictIndexColumnIDGuaranteesVersion) + keys, err := EncodeInvertedIndexTableKeys(indexedValue, nil, descpb.LatestNonPrimaryIndexDescriptorVersion) require.NoError(t, err) invertedExpr, err := EncodeContainedInvertedIndexSpans(&evalCtx, value) diff --git a/pkg/sql/schemachanger/scexec/executor_external_test.go b/pkg/sql/schemachanger/scexec/executor_external_test.go index 40c2f45b271c..fa4dbe2be038 100644 --- a/pkg/sql/schemachanger/scexec/executor_external_test.go +++ b/pkg/sql/schemachanger/scexec/executor_external_test.go @@ -166,7 +166,7 @@ CREATE TABLE db.t ( indexToAdd := descpb.IndexDescriptor{ ID: 2, Name: "foo", - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, CreatedExplicitly: true, KeyColumnIDs: []descpb.ColumnID{1}, KeyColumnNames: []string{"i"}, diff --git a/pkg/sql/schemachanger/scexec/scmutationexec/scmutationexec.go b/pkg/sql/schemachanger/scexec/scmutationexec/scmutationexec.go index 8efab0029b5b..2737d43f1698 100644 --- a/pkg/sql/schemachanger/scexec/scmutationexec/scmutationexec.go +++ b/pkg/sql/schemachanger/scexec/scmutationexec/scmutationexec.go @@ -778,10 +778,10 @@ func (m *visitor) MakeAddedIndexDeleteOnly( } // Set up the encoding type. encodingType := descpb.PrimaryIndexEncoding - indexVersion := descpb.PrimaryIndexWithStoredColumnsVersion + indexVersion := descpb.LatestPrimaryIndexDescriptorVersion if op.SecondaryIndex { encodingType = descpb.SecondaryIndexEncoding - indexVersion = descpb.StrictIndexColumnIDGuaranteesVersion + indexVersion = descpb.LatestNonPrimaryIndexDescriptorVersion } // Create an index descriptor from the operation. idx := &descpb.IndexDescriptor{ diff --git a/pkg/sql/table_test.go b/pkg/sql/table_test.go index c65428b99a52..bf2f7ccf467d 100644 --- a/pkg/sql/table_test.go +++ b/pkg/sql/table_test.go @@ -217,7 +217,7 @@ func TestMakeTableDescIndexes(t *testing.T) { KeyColumnIDs: []descpb.ColumnID{1}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, []descpb.IndexDescriptor{}, }, @@ -233,7 +233,7 @@ func TestMakeTableDescIndexes(t *testing.T) { StoreColumnNames: []string{"a"}, StoreColumnIDs: []descpb.ColumnID{1}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, []descpb.IndexDescriptor{ { @@ -244,7 +244,7 @@ func TestMakeTableDescIndexes(t *testing.T) { KeyColumnIDs: []descpb.ColumnID{1}, KeySuffixColumnIDs: []descpb.ColumnID{2}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, }, }, @@ -258,7 +258,7 @@ func TestMakeTableDescIndexes(t *testing.T) { KeyColumnIDs: []descpb.ColumnID{1, 2}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, []descpb.IndexDescriptor{}, }, @@ -272,7 +272,7 @@ func TestMakeTableDescIndexes(t *testing.T) { KeyColumnIDs: []descpb.ColumnID{1, 2}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, []descpb.IndexDescriptor{ { @@ -283,7 +283,7 @@ func TestMakeTableDescIndexes(t *testing.T) { KeyColumnIDs: []descpb.ColumnID{2}, KeySuffixColumnIDs: []descpb.ColumnID{1}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC}, - Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Version: descpb.LatestNonPrimaryIndexDescriptorVersion, }, }, }, @@ -297,7 +297,7 @@ func TestMakeTableDescIndexes(t *testing.T) { KeyColumnIDs: []descpb.ColumnID{1, 2}, KeyColumnDirections: []descpb.IndexDescriptor_Direction{descpb.IndexDescriptor_ASC, descpb.IndexDescriptor_ASC}, EncodingType: descpb.PrimaryIndexEncoding, - Version: descpb.PrimaryIndexWithStoredColumnsVersion, + Version: descpb.LatestPrimaryIndexDescriptorVersion, }, []descpb.IndexDescriptor{}, }, From 33ef0ff8c60f2bf38ed409b8df0b77681d8ff31b Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Wed, 24 Nov 2021 14:53:45 -0600 Subject: [PATCH 6/7] bazel: perform staticcheck checks in `nogo` Add a new binary `generate-staticcheck`, part of `dev generate bazel`, that creates a package in `build/bazelutil/staticcheckanalyzers` capturing a single `staticcheck` check. Then we capture the list of analyzers in `build/bazelutil/staticcheckanalyzers/def.bzl` and add all those checks to `nogo`. However, we can't directly use the `Analyzer`s provided by the upstream library, because they report *all* violations regardless of `lint:ignore` directives. In order to address this we add a helper library at `pkg/testutils/lint/passes/staticcheck` that munges the `Analyzer`s to additionally pull the `lint:ignore` directives and ignore any reported diagnostics that correspond to a `lint:ignore`. This follows the example set by https://github.com/sluongng/staticcheck-codegen, but we don't directly use that code, since we need to inject our own stuff and we want to make sure the content here is pinned to the right version of `staticcheck`. We run the `staticcheck` and `simple` [checks](https://staticcheck.io/docs/checks). `stylecheck` is still broken: #73568 Closes #68496. Release note: None --- .github/CODEOWNERS | 1 + BUILD.bazel | 3 +- build/bazelutil/bazel-generate.sh | 1 + build/bazelutil/nogo_config.json | 1315 ++++++++++++++++- .../staticcheckanalyzers/BUILD.bazel | 1 + .../bazelutil/staticcheckanalyzers/README.md | 1 + build/bazelutil/staticcheckanalyzers/def.bzl | 123 ++ .../staticcheckanalyzers/s1000/BUILD.bazel | 13 + .../staticcheckanalyzers/s1000/analyzer.go | 24 + .../staticcheckanalyzers/s1001/BUILD.bazel | 13 + .../staticcheckanalyzers/s1001/analyzer.go | 24 + .../staticcheckanalyzers/s1002/BUILD.bazel | 13 + .../staticcheckanalyzers/s1002/analyzer.go | 24 + .../staticcheckanalyzers/s1003/BUILD.bazel | 13 + .../staticcheckanalyzers/s1003/analyzer.go | 24 + .../staticcheckanalyzers/s1004/BUILD.bazel | 13 + .../staticcheckanalyzers/s1004/analyzer.go | 24 + .../staticcheckanalyzers/s1005/BUILD.bazel | 13 + .../staticcheckanalyzers/s1005/analyzer.go | 24 + .../staticcheckanalyzers/s1006/BUILD.bazel | 13 + .../staticcheckanalyzers/s1006/analyzer.go | 24 + .../staticcheckanalyzers/s1007/BUILD.bazel | 13 + .../staticcheckanalyzers/s1007/analyzer.go | 24 + .../staticcheckanalyzers/s1008/BUILD.bazel | 13 + .../staticcheckanalyzers/s1008/analyzer.go | 24 + .../staticcheckanalyzers/s1009/BUILD.bazel | 13 + .../staticcheckanalyzers/s1009/analyzer.go | 24 + .../staticcheckanalyzers/s1010/BUILD.bazel | 13 + .../staticcheckanalyzers/s1010/analyzer.go | 24 + .../staticcheckanalyzers/s1011/BUILD.bazel | 13 + .../staticcheckanalyzers/s1011/analyzer.go | 24 + .../staticcheckanalyzers/s1012/BUILD.bazel | 13 + .../staticcheckanalyzers/s1012/analyzer.go | 24 + .../staticcheckanalyzers/s1016/BUILD.bazel | 13 + .../staticcheckanalyzers/s1016/analyzer.go | 24 + .../staticcheckanalyzers/s1017/BUILD.bazel | 13 + .../staticcheckanalyzers/s1017/analyzer.go | 24 + .../staticcheckanalyzers/s1018/BUILD.bazel | 13 + .../staticcheckanalyzers/s1018/analyzer.go | 24 + .../staticcheckanalyzers/s1019/BUILD.bazel | 13 + .../staticcheckanalyzers/s1019/analyzer.go | 24 + .../staticcheckanalyzers/s1020/BUILD.bazel | 13 + .../staticcheckanalyzers/s1020/analyzer.go | 24 + .../staticcheckanalyzers/s1021/BUILD.bazel | 13 + .../staticcheckanalyzers/s1021/analyzer.go | 24 + .../staticcheckanalyzers/s1023/BUILD.bazel | 13 + .../staticcheckanalyzers/s1023/analyzer.go | 24 + .../staticcheckanalyzers/s1024/BUILD.bazel | 13 + .../staticcheckanalyzers/s1024/analyzer.go | 24 + .../staticcheckanalyzers/s1025/BUILD.bazel | 13 + .../staticcheckanalyzers/s1025/analyzer.go | 24 + .../staticcheckanalyzers/s1028/BUILD.bazel | 13 + .../staticcheckanalyzers/s1028/analyzer.go | 24 + .../staticcheckanalyzers/s1029/BUILD.bazel | 13 + .../staticcheckanalyzers/s1029/analyzer.go | 24 + .../staticcheckanalyzers/s1030/BUILD.bazel | 13 + .../staticcheckanalyzers/s1030/analyzer.go | 24 + .../staticcheckanalyzers/s1031/BUILD.bazel | 13 + .../staticcheckanalyzers/s1031/analyzer.go | 24 + .../staticcheckanalyzers/s1032/BUILD.bazel | 13 + .../staticcheckanalyzers/s1032/analyzer.go | 24 + .../staticcheckanalyzers/s1033/BUILD.bazel | 13 + .../staticcheckanalyzers/s1033/analyzer.go | 24 + .../staticcheckanalyzers/s1034/BUILD.bazel | 13 + .../staticcheckanalyzers/s1034/analyzer.go | 24 + .../staticcheckanalyzers/s1035/BUILD.bazel | 13 + .../staticcheckanalyzers/s1035/analyzer.go | 24 + .../staticcheckanalyzers/s1036/BUILD.bazel | 13 + .../staticcheckanalyzers/s1036/analyzer.go | 24 + .../staticcheckanalyzers/s1037/BUILD.bazel | 13 + .../staticcheckanalyzers/s1037/analyzer.go | 24 + .../staticcheckanalyzers/s1038/BUILD.bazel | 13 + .../staticcheckanalyzers/s1038/analyzer.go | 24 + .../staticcheckanalyzers/s1039/BUILD.bazel | 13 + .../staticcheckanalyzers/s1039/analyzer.go | 24 + .../staticcheckanalyzers/s1040/BUILD.bazel | 13 + .../staticcheckanalyzers/s1040/analyzer.go | 24 + .../staticcheckanalyzers/sa1000/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1000/analyzer.go | 24 + .../staticcheckanalyzers/sa1001/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1001/analyzer.go | 24 + .../staticcheckanalyzers/sa1002/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1002/analyzer.go | 24 + .../staticcheckanalyzers/sa1003/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1003/analyzer.go | 24 + .../staticcheckanalyzers/sa1004/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1004/analyzer.go | 24 + .../staticcheckanalyzers/sa1005/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1005/analyzer.go | 24 + .../staticcheckanalyzers/sa1006/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1006/analyzer.go | 24 + .../staticcheckanalyzers/sa1007/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1007/analyzer.go | 24 + .../staticcheckanalyzers/sa1008/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1008/analyzer.go | 24 + .../staticcheckanalyzers/sa1010/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1010/analyzer.go | 24 + .../staticcheckanalyzers/sa1011/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1011/analyzer.go | 24 + .../staticcheckanalyzers/sa1012/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1012/analyzer.go | 24 + .../staticcheckanalyzers/sa1013/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1013/analyzer.go | 24 + .../staticcheckanalyzers/sa1014/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1014/analyzer.go | 24 + .../staticcheckanalyzers/sa1015/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1015/analyzer.go | 24 + .../staticcheckanalyzers/sa1016/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1016/analyzer.go | 24 + .../staticcheckanalyzers/sa1017/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1017/analyzer.go | 24 + .../staticcheckanalyzers/sa1018/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1018/analyzer.go | 24 + .../staticcheckanalyzers/sa1019/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1019/analyzer.go | 24 + .../staticcheckanalyzers/sa1020/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1020/analyzer.go | 24 + .../staticcheckanalyzers/sa1021/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1021/analyzer.go | 24 + .../staticcheckanalyzers/sa1023/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1023/analyzer.go | 24 + .../staticcheckanalyzers/sa1024/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1024/analyzer.go | 24 + .../staticcheckanalyzers/sa1025/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1025/analyzer.go | 24 + .../staticcheckanalyzers/sa1026/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1026/analyzer.go | 24 + .../staticcheckanalyzers/sa1027/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1027/analyzer.go | 24 + .../staticcheckanalyzers/sa1028/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1028/analyzer.go | 24 + .../staticcheckanalyzers/sa1029/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1029/analyzer.go | 24 + .../staticcheckanalyzers/sa1030/BUILD.bazel | 13 + .../staticcheckanalyzers/sa1030/analyzer.go | 24 + .../staticcheckanalyzers/sa2000/BUILD.bazel | 13 + .../staticcheckanalyzers/sa2000/analyzer.go | 24 + .../staticcheckanalyzers/sa2001/BUILD.bazel | 13 + .../staticcheckanalyzers/sa2001/analyzer.go | 24 + .../staticcheckanalyzers/sa2002/BUILD.bazel | 13 + .../staticcheckanalyzers/sa2002/analyzer.go | 24 + .../staticcheckanalyzers/sa2003/BUILD.bazel | 13 + .../staticcheckanalyzers/sa2003/analyzer.go | 24 + .../staticcheckanalyzers/sa3000/BUILD.bazel | 13 + .../staticcheckanalyzers/sa3000/analyzer.go | 24 + .../staticcheckanalyzers/sa3001/BUILD.bazel | 13 + .../staticcheckanalyzers/sa3001/analyzer.go | 24 + .../staticcheckanalyzers/sa4000/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4000/analyzer.go | 24 + .../staticcheckanalyzers/sa4001/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4001/analyzer.go | 24 + .../staticcheckanalyzers/sa4003/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4003/analyzer.go | 24 + .../staticcheckanalyzers/sa4004/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4004/analyzer.go | 24 + .../staticcheckanalyzers/sa4005/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4005/analyzer.go | 24 + .../staticcheckanalyzers/sa4006/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4006/analyzer.go | 24 + .../staticcheckanalyzers/sa4008/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4008/analyzer.go | 24 + .../staticcheckanalyzers/sa4009/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4009/analyzer.go | 24 + .../staticcheckanalyzers/sa4010/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4010/analyzer.go | 24 + .../staticcheckanalyzers/sa4011/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4011/analyzer.go | 24 + .../staticcheckanalyzers/sa4012/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4012/analyzer.go | 24 + .../staticcheckanalyzers/sa4013/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4013/analyzer.go | 24 + .../staticcheckanalyzers/sa4014/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4014/analyzer.go | 24 + .../staticcheckanalyzers/sa4015/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4015/analyzer.go | 24 + .../staticcheckanalyzers/sa4016/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4016/analyzer.go | 24 + .../staticcheckanalyzers/sa4017/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4017/analyzer.go | 24 + .../staticcheckanalyzers/sa4018/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4018/analyzer.go | 24 + .../staticcheckanalyzers/sa4019/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4019/analyzer.go | 24 + .../staticcheckanalyzers/sa4020/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4020/analyzer.go | 24 + .../staticcheckanalyzers/sa4021/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4021/analyzer.go | 24 + .../staticcheckanalyzers/sa4022/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4022/analyzer.go | 24 + .../staticcheckanalyzers/sa4023/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4023/analyzer.go | 24 + .../staticcheckanalyzers/sa4024/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4024/analyzer.go | 24 + .../staticcheckanalyzers/sa4025/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4025/analyzer.go | 24 + .../staticcheckanalyzers/sa4026/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4026/analyzer.go | 24 + .../staticcheckanalyzers/sa4027/BUILD.bazel | 13 + .../staticcheckanalyzers/sa4027/analyzer.go | 24 + .../staticcheckanalyzers/sa5000/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5000/analyzer.go | 24 + .../staticcheckanalyzers/sa5001/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5001/analyzer.go | 24 + .../staticcheckanalyzers/sa5002/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5002/analyzer.go | 24 + .../staticcheckanalyzers/sa5003/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5003/analyzer.go | 24 + .../staticcheckanalyzers/sa5004/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5004/analyzer.go | 24 + .../staticcheckanalyzers/sa5005/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5005/analyzer.go | 24 + .../staticcheckanalyzers/sa5007/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5007/analyzer.go | 24 + .../staticcheckanalyzers/sa5008/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5008/analyzer.go | 24 + .../staticcheckanalyzers/sa5009/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5009/analyzer.go | 24 + .../staticcheckanalyzers/sa5010/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5010/analyzer.go | 24 + .../staticcheckanalyzers/sa5011/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5011/analyzer.go | 24 + .../staticcheckanalyzers/sa5012/BUILD.bazel | 13 + .../staticcheckanalyzers/sa5012/analyzer.go | 24 + .../staticcheckanalyzers/sa6000/BUILD.bazel | 13 + .../staticcheckanalyzers/sa6000/analyzer.go | 24 + .../staticcheckanalyzers/sa6001/BUILD.bazel | 13 + .../staticcheckanalyzers/sa6001/analyzer.go | 24 + .../staticcheckanalyzers/sa6002/BUILD.bazel | 13 + .../staticcheckanalyzers/sa6002/analyzer.go | 24 + .../staticcheckanalyzers/sa6003/BUILD.bazel | 13 + .../staticcheckanalyzers/sa6003/analyzer.go | 24 + .../staticcheckanalyzers/sa6005/BUILD.bazel | 13 + .../staticcheckanalyzers/sa6005/analyzer.go | 24 + .../staticcheckanalyzers/sa9001/BUILD.bazel | 13 + .../staticcheckanalyzers/sa9001/analyzer.go | 24 + .../staticcheckanalyzers/sa9002/BUILD.bazel | 13 + .../staticcheckanalyzers/sa9002/analyzer.go | 24 + .../staticcheckanalyzers/sa9003/BUILD.bazel | 13 + .../staticcheckanalyzers/sa9003/analyzer.go | 24 + .../staticcheckanalyzers/sa9004/BUILD.bazel | 13 + .../staticcheckanalyzers/sa9004/analyzer.go | 24 + .../staticcheckanalyzers/sa9005/BUILD.bazel | 13 + .../staticcheckanalyzers/sa9005/analyzer.go | 24 + .../staticcheckanalyzers/sa9006/BUILD.bazel | 13 + .../staticcheckanalyzers/sa9006/analyzer.go | 24 + pkg/cmd/dev/build.go | 1 + pkg/cmd/generate-staticcheck/BUILD.bazel | 19 + pkg/cmd/generate-staticcheck/main.go | 129 ++ pkg/testutils/lint/lint_test.go | 4 +- .../lint/passes/staticcheck/BUILD.bazel | 14 + .../lint/passes/staticcheck/staticcheck.go | 73 + pkg/util/log/stderr_redirect_windows.go | 5 +- 252 files changed, 6086 insertions(+), 7 deletions(-) create mode 100644 build/bazelutil/staticcheckanalyzers/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/README.md create mode 100644 build/bazelutil/staticcheckanalyzers/def.bzl create mode 100644 build/bazelutil/staticcheckanalyzers/s1000/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1000/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1002/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1002/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1003/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1003/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1004/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1004/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1005/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1005/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1006/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1006/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1007/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1007/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1008/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1008/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1009/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1009/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1010/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1010/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1011/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1011/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1012/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1012/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1016/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1016/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1017/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1017/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1018/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1018/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1019/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1019/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1020/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1020/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1021/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1021/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1023/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1023/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1024/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1024/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1025/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1025/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1028/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1028/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1029/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1029/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1030/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1030/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1031/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1031/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1032/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1032/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1033/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1033/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1034/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1034/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1035/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1035/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1036/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1036/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1037/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1037/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1038/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1038/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1039/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1039/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/s1040/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/s1040/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1000/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1000/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1002/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1002/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1003/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1003/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1004/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1004/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1005/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1005/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1006/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1006/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1007/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1007/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1008/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1008/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1010/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1010/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1011/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1011/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1012/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1012/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1013/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1013/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1014/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1014/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1015/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1015/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1016/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1016/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1017/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1017/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1018/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1018/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1019/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1019/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1020/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1020/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1021/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1021/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1023/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1023/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1024/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1024/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1025/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1025/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1026/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1026/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1027/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1027/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1028/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1028/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1029/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1029/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa1030/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa1030/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa2000/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa2000/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa2001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa2001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa2002/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa2002/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa2003/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa2003/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa3000/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa3000/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa3001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa3001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4000/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4000/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4003/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4003/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4004/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4004/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4005/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4005/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4006/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4006/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4008/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4008/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4009/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4009/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4010/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4010/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4011/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4011/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4012/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4012/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4013/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4013/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4014/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4014/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4015/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4015/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4016/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4016/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4017/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4017/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4018/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4018/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4019/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4019/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4020/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4020/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4021/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4021/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4022/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4022/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4023/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4023/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4024/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4024/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4025/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4025/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4026/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4026/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa4027/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa4027/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5000/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5000/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5002/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5002/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5003/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5003/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5004/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5004/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5005/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5005/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5007/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5007/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5008/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5008/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5009/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5009/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5010/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5010/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5011/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5011/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa5012/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa5012/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa6000/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa6000/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa6001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa6001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa6002/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa6002/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa6003/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa6003/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa6005/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa6005/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa9001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa9001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa9002/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa9002/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa9003/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa9003/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa9004/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa9004/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa9005/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa9005/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/sa9006/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/sa9006/analyzer.go create mode 100644 pkg/cmd/generate-staticcheck/BUILD.bazel create mode 100644 pkg/cmd/generate-staticcheck/main.go create mode 100644 pkg/testutils/lint/passes/staticcheck/BUILD.bazel create mode 100644 pkg/testutils/lint/passes/staticcheck/staticcheck.go diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b7ce34297a1f..858c897310b3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -161,6 +161,7 @@ /pkg/cmd/generate-metadata-tables/ @cockroachdb/sql-experience /pkg/cmd/generate-spatial-ref-sys/ @cockroachdb/geospatial /pkg/cmd/generate-test-suites/ @cockroachdb/dev-inf +/pkg/cmd/generate-staticcheck/ @cockroachdb/dev-inf /pkg/cmd/geoviz/ @cockroachdb/geospatial /pkg/cmd/github-post/ @cockroachdb/test-eng /pkg/cmd/github-pull-request-make/ @cockroachdb/dev-inf diff --git a/BUILD.bazel b/BUILD.bazel index d2d4b590ed6c..ee78f6cb6a08 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -7,6 +7,7 @@ exports_files([ load("@bazel_gazelle//:def.bzl", "gazelle") load("@io_bazel_rules_go//go:def.bzl", "nogo") +load("//build/bazelutil/staticcheckanalyzers:def.bzl", "STATICCHECK_CHECKS") # The following directives inform gazelle how to auto-generate BUILD.bazel # files throughout the repo. By including them here, we can run gazelle using @@ -250,6 +251,6 @@ nogo( "//pkg/testutils/lint/passes/returnerrcheck", "//pkg/testutils/lint/passes/timer", "//pkg/testutils/lint/passes/unconvert", - ], + ] + STATICCHECK_CHECKS, }), ) diff --git a/build/bazelutil/bazel-generate.sh b/build/bazelutil/bazel-generate.sh index 08adeb3d6236..43b61002b4d8 100755 --- a/build/bazelutil/bazel-generate.sh +++ b/build/bazelutil/bazel-generate.sh @@ -9,6 +9,7 @@ set -euo pipefail CONTENTS=$(bazel run //pkg/cmd/mirror) echo "$CONTENTS" > DEPS.bzl +bazel run pkg/cmd/generate-staticcheck --run_under="cd $PWD && " bazel run //:gazelle CONTENTS=$(bazel run //pkg/cmd/generate-test-suites --run_under="cd $PWD && ") echo "$CONTENTS" > pkg/BUILD.bazel diff --git a/build/bazelutil/nogo_config.json b/build/bazelutil/nogo_config.json index d9391744eaca..ee78229a0c30 100644 --- a/build/bazelutil/nogo_config.json +++ b/build/bazelutil/nogo_config.json @@ -26,7 +26,7 @@ } }, "errcheck": { - "exclude_files": { + "exclude_files": { "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", ".*\\.pb\\.go$": "generated code", ".*\\.pb\\.gw\\.go$": "generated code", @@ -104,6 +104,1319 @@ "github.com/cockroachdb/cockroach/.*$": "first-party code" } }, + "S1000": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1002": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1003": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1004": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1005": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1006": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1007": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1008": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1009": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1010": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1011": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1012": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1016": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1017": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1018": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1019": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1020": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1021": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1023": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1024": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1025": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1028": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1029": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1030": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1031": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1032": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1033": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1034": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1035": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1036": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1037": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1038": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1039": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "S1040": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1000": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1002": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1003": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1004": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1005": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1006": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1007": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1008": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1010": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1011": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1012": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1013": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1014": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1015": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1016": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1017": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1018": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1019": { + "exclude_files": { + "github.com/cockroachdb/cockroach/pkg/roachpb/api_test.go$": "same package that grpc-go imports", + "github.com/cockroachdb/cockroach/pkg/rpc/codec.go$": "rpc/codec.go imports the same proto package that grpc-go imports (as of crdb@dd87d1145 and grpc-go@7b167fd6).", + "github.com/cockroachdb/cockroach/pkg/rpc/stats_handler.go$": "Using deprecated WireLength call", + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1020": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1021": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1023": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1024": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1025": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1026": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1027": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1028": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1029": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA1030": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA2000": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA2001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA2002": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA2003": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA3000": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA3001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4000": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4003": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4004": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4005": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4006": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4008": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4009": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4010": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4011": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4012": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4013": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4014": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4015": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4016": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4017": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4018": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4019": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4020": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4021": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4022": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4023": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4024": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4025": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4026": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA4027": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5000": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5002": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5003": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5004": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5005": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5007": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5008": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5009": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5010": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5011": { + "exclude_files": { + "_test\\.go$": "tests", + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA5012": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA6000": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA6001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA6002": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA6003": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA6005": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA9001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA9002": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA9003": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA9004": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA9005": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "SA9006": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, "stdmethods": { "only_files": { "github.com/cockroachdb/cockroach/.*$": "first-party code" diff --git a/build/bazelutil/staticcheckanalyzers/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/BUILD.bazel new file mode 100644 index 000000000000..50f545d6c4e4 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/BUILD.bazel @@ -0,0 +1 @@ +exports_files(["def.bzl"]) diff --git a/build/bazelutil/staticcheckanalyzers/README.md b/build/bazelutil/staticcheckanalyzers/README.md new file mode 100644 index 000000000000..7a8ef54e330b --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/README.md @@ -0,0 +1 @@ +All of the code in this directory is generated by generate-staticcheck for use in Bazel. diff --git a/build/bazelutil/staticcheckanalyzers/def.bzl b/build/bazelutil/staticcheckanalyzers/def.bzl new file mode 100644 index 000000000000..362e48566fbb --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/def.bzl @@ -0,0 +1,123 @@ +# Code generated by generate-staticcheck; DO NOT EDIT. + +STATICCHECK_CHECKS = [ + "//build/bazelutil/staticcheckanalyzers/s1000", + "//build/bazelutil/staticcheckanalyzers/s1001", + "//build/bazelutil/staticcheckanalyzers/s1002", + "//build/bazelutil/staticcheckanalyzers/s1003", + "//build/bazelutil/staticcheckanalyzers/s1004", + "//build/bazelutil/staticcheckanalyzers/s1005", + "//build/bazelutil/staticcheckanalyzers/s1006", + "//build/bazelutil/staticcheckanalyzers/s1007", + "//build/bazelutil/staticcheckanalyzers/s1008", + "//build/bazelutil/staticcheckanalyzers/s1009", + "//build/bazelutil/staticcheckanalyzers/s1010", + "//build/bazelutil/staticcheckanalyzers/s1011", + "//build/bazelutil/staticcheckanalyzers/s1012", + "//build/bazelutil/staticcheckanalyzers/s1016", + "//build/bazelutil/staticcheckanalyzers/s1017", + "//build/bazelutil/staticcheckanalyzers/s1018", + "//build/bazelutil/staticcheckanalyzers/s1019", + "//build/bazelutil/staticcheckanalyzers/s1020", + "//build/bazelutil/staticcheckanalyzers/s1021", + "//build/bazelutil/staticcheckanalyzers/s1023", + "//build/bazelutil/staticcheckanalyzers/s1024", + "//build/bazelutil/staticcheckanalyzers/s1025", + "//build/bazelutil/staticcheckanalyzers/s1028", + "//build/bazelutil/staticcheckanalyzers/s1029", + "//build/bazelutil/staticcheckanalyzers/s1030", + "//build/bazelutil/staticcheckanalyzers/s1031", + "//build/bazelutil/staticcheckanalyzers/s1032", + "//build/bazelutil/staticcheckanalyzers/s1033", + "//build/bazelutil/staticcheckanalyzers/s1034", + "//build/bazelutil/staticcheckanalyzers/s1035", + "//build/bazelutil/staticcheckanalyzers/s1036", + "//build/bazelutil/staticcheckanalyzers/s1037", + "//build/bazelutil/staticcheckanalyzers/s1038", + "//build/bazelutil/staticcheckanalyzers/s1039", + "//build/bazelutil/staticcheckanalyzers/s1040", + "//build/bazelutil/staticcheckanalyzers/sa1000", + "//build/bazelutil/staticcheckanalyzers/sa1001", + "//build/bazelutil/staticcheckanalyzers/sa1002", + "//build/bazelutil/staticcheckanalyzers/sa1003", + "//build/bazelutil/staticcheckanalyzers/sa1004", + "//build/bazelutil/staticcheckanalyzers/sa1005", + "//build/bazelutil/staticcheckanalyzers/sa1006", + "//build/bazelutil/staticcheckanalyzers/sa1007", + "//build/bazelutil/staticcheckanalyzers/sa1008", + "//build/bazelutil/staticcheckanalyzers/sa1010", + "//build/bazelutil/staticcheckanalyzers/sa1011", + "//build/bazelutil/staticcheckanalyzers/sa1012", + "//build/bazelutil/staticcheckanalyzers/sa1013", + "//build/bazelutil/staticcheckanalyzers/sa1014", + "//build/bazelutil/staticcheckanalyzers/sa1015", + "//build/bazelutil/staticcheckanalyzers/sa1016", + "//build/bazelutil/staticcheckanalyzers/sa1017", + "//build/bazelutil/staticcheckanalyzers/sa1018", + "//build/bazelutil/staticcheckanalyzers/sa1019", + "//build/bazelutil/staticcheckanalyzers/sa1020", + "//build/bazelutil/staticcheckanalyzers/sa1021", + "//build/bazelutil/staticcheckanalyzers/sa1023", + "//build/bazelutil/staticcheckanalyzers/sa1024", + "//build/bazelutil/staticcheckanalyzers/sa1025", + "//build/bazelutil/staticcheckanalyzers/sa1026", + "//build/bazelutil/staticcheckanalyzers/sa1027", + "//build/bazelutil/staticcheckanalyzers/sa1028", + "//build/bazelutil/staticcheckanalyzers/sa1029", + "//build/bazelutil/staticcheckanalyzers/sa1030", + "//build/bazelutil/staticcheckanalyzers/sa2000", + "//build/bazelutil/staticcheckanalyzers/sa2001", + "//build/bazelutil/staticcheckanalyzers/sa2002", + "//build/bazelutil/staticcheckanalyzers/sa2003", + "//build/bazelutil/staticcheckanalyzers/sa3000", + "//build/bazelutil/staticcheckanalyzers/sa3001", + "//build/bazelutil/staticcheckanalyzers/sa4000", + "//build/bazelutil/staticcheckanalyzers/sa4001", + "//build/bazelutil/staticcheckanalyzers/sa4003", + "//build/bazelutil/staticcheckanalyzers/sa4004", + "//build/bazelutil/staticcheckanalyzers/sa4005", + "//build/bazelutil/staticcheckanalyzers/sa4006", + "//build/bazelutil/staticcheckanalyzers/sa4008", + "//build/bazelutil/staticcheckanalyzers/sa4009", + "//build/bazelutil/staticcheckanalyzers/sa4010", + "//build/bazelutil/staticcheckanalyzers/sa4011", + "//build/bazelutil/staticcheckanalyzers/sa4012", + "//build/bazelutil/staticcheckanalyzers/sa4013", + "//build/bazelutil/staticcheckanalyzers/sa4014", + "//build/bazelutil/staticcheckanalyzers/sa4015", + "//build/bazelutil/staticcheckanalyzers/sa4016", + "//build/bazelutil/staticcheckanalyzers/sa4017", + "//build/bazelutil/staticcheckanalyzers/sa4018", + "//build/bazelutil/staticcheckanalyzers/sa4019", + "//build/bazelutil/staticcheckanalyzers/sa4020", + "//build/bazelutil/staticcheckanalyzers/sa4021", + "//build/bazelutil/staticcheckanalyzers/sa4022", + "//build/bazelutil/staticcheckanalyzers/sa4023", + "//build/bazelutil/staticcheckanalyzers/sa4024", + "//build/bazelutil/staticcheckanalyzers/sa4025", + "//build/bazelutil/staticcheckanalyzers/sa4026", + "//build/bazelutil/staticcheckanalyzers/sa4027", + "//build/bazelutil/staticcheckanalyzers/sa5000", + "//build/bazelutil/staticcheckanalyzers/sa5001", + "//build/bazelutil/staticcheckanalyzers/sa5002", + "//build/bazelutil/staticcheckanalyzers/sa5003", + "//build/bazelutil/staticcheckanalyzers/sa5004", + "//build/bazelutil/staticcheckanalyzers/sa5005", + "//build/bazelutil/staticcheckanalyzers/sa5007", + "//build/bazelutil/staticcheckanalyzers/sa5008", + "//build/bazelutil/staticcheckanalyzers/sa5009", + "//build/bazelutil/staticcheckanalyzers/sa5010", + "//build/bazelutil/staticcheckanalyzers/sa5011", + "//build/bazelutil/staticcheckanalyzers/sa5012", + "//build/bazelutil/staticcheckanalyzers/sa6000", + "//build/bazelutil/staticcheckanalyzers/sa6001", + "//build/bazelutil/staticcheckanalyzers/sa6002", + "//build/bazelutil/staticcheckanalyzers/sa6003", + "//build/bazelutil/staticcheckanalyzers/sa6005", + "//build/bazelutil/staticcheckanalyzers/sa9001", + "//build/bazelutil/staticcheckanalyzers/sa9002", + "//build/bazelutil/staticcheckanalyzers/sa9003", + "//build/bazelutil/staticcheckanalyzers/sa9004", + "//build/bazelutil/staticcheckanalyzers/sa9005", + "//build/bazelutil/staticcheckanalyzers/sa9006", +] diff --git a/build/bazelutil/staticcheckanalyzers/s1000/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1000/BUILD.bazel new file mode 100644 index 000000000000..96e279f3e950 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1000/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1000", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1000", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1000/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1000/analyzer.go new file mode 100644 index 000000000000..873450b37983 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1000/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1000 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1000" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1001/BUILD.bazel new file mode 100644 index 000000000000..bd92983c2513 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1001/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1001/analyzer.go new file mode 100644 index 000000000000..48a87bf68ae2 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1002/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1002/BUILD.bazel new file mode 100644 index 000000000000..c1f72e380e41 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1002/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1002", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1002", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1002/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1002/analyzer.go new file mode 100644 index 000000000000..f09edb662c6a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1002/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1002 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1002" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1003/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1003/BUILD.bazel new file mode 100644 index 000000000000..1aaac650a5fa --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1003/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1003", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1003", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1003/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1003/analyzer.go new file mode 100644 index 000000000000..55946edc1117 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1003/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1003 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1003" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1004/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1004/BUILD.bazel new file mode 100644 index 000000000000..653a9456806c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1004/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1004", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1004", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1004/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1004/analyzer.go new file mode 100644 index 000000000000..fae3860850c8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1004/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1004 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1004" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1005/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1005/BUILD.bazel new file mode 100644 index 000000000000..9fb5c1a7eb63 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1005/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1005", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1005", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1005/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1005/analyzer.go new file mode 100644 index 000000000000..575023ad6910 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1005/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1005 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1005" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1006/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1006/BUILD.bazel new file mode 100644 index 000000000000..712621889385 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1006/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1006", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1006", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1006/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1006/analyzer.go new file mode 100644 index 000000000000..4e6d35a1aa63 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1006/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1006 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1006" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1007/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1007/BUILD.bazel new file mode 100644 index 000000000000..9533db0316d2 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1007/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1007", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1007", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1007/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1007/analyzer.go new file mode 100644 index 000000000000..72f893353669 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1007/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1007 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1007" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1008/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1008/BUILD.bazel new file mode 100644 index 000000000000..7b794b9c4280 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1008/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1008", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1008", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1008/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1008/analyzer.go new file mode 100644 index 000000000000..c74632c326a8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1008/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1008 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1008" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1009/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1009/BUILD.bazel new file mode 100644 index 000000000000..de68c1e43112 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1009/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1009", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1009", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1009/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1009/analyzer.go new file mode 100644 index 000000000000..0607068f3161 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1009/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1009 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1009" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1010/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1010/BUILD.bazel new file mode 100644 index 000000000000..046c5396c388 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1010/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1010", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1010", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1010/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1010/analyzer.go new file mode 100644 index 000000000000..ca2f98aef586 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1010/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1010 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1010" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1011/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1011/BUILD.bazel new file mode 100644 index 000000000000..c6812b7ac267 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1011/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1011", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1011", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1011/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1011/analyzer.go new file mode 100644 index 000000000000..d740d277d985 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1011/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1011 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1011" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1012/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1012/BUILD.bazel new file mode 100644 index 000000000000..7dbd0d558a3c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1012/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1012", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1012", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1012/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1012/analyzer.go new file mode 100644 index 000000000000..3161722226f2 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1012/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1012 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1012" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1016/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1016/BUILD.bazel new file mode 100644 index 000000000000..a1667919777c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1016/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1016", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1016", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1016/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1016/analyzer.go new file mode 100644 index 000000000000..5897bdd06e27 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1016/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1016 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1016" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1017/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1017/BUILD.bazel new file mode 100644 index 000000000000..3969c0c1817c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1017/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1017", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1017", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1017/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1017/analyzer.go new file mode 100644 index 000000000000..e6e1d287208e --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1017/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1017 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1017" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1018/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1018/BUILD.bazel new file mode 100644 index 000000000000..f5e0dfa3749d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1018/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1018", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1018", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1018/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1018/analyzer.go new file mode 100644 index 000000000000..ddc0a87f404d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1018/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1018 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1018" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1019/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1019/BUILD.bazel new file mode 100644 index 000000000000..0a7664167ab7 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1019/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1019", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1019", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1019/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1019/analyzer.go new file mode 100644 index 000000000000..c937e7107dd6 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1019/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1019 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1019" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1020/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1020/BUILD.bazel new file mode 100644 index 000000000000..80ed8d7b2980 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1020/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1020", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1020", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1020/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1020/analyzer.go new file mode 100644 index 000000000000..c19f5464fe44 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1020/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1020 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1020" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1021/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1021/BUILD.bazel new file mode 100644 index 000000000000..dec08b6c1360 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1021/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1021", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1021", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1021/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1021/analyzer.go new file mode 100644 index 000000000000..48f9c71e810c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1021/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1021 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1021" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1023/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1023/BUILD.bazel new file mode 100644 index 000000000000..dd28f453c532 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1023/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1023", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1023", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1023/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1023/analyzer.go new file mode 100644 index 000000000000..ef98962c876a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1023/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1023 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1023" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1024/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1024/BUILD.bazel new file mode 100644 index 000000000000..6f1b1f4e3a4a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1024/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1024", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1024", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1024/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1024/analyzer.go new file mode 100644 index 000000000000..f656e83fff10 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1024/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1024 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1024" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1025/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1025/BUILD.bazel new file mode 100644 index 000000000000..4b82a5192d08 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1025/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1025", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1025", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1025/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1025/analyzer.go new file mode 100644 index 000000000000..b410282c94f9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1025/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1025 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1025" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1028/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1028/BUILD.bazel new file mode 100644 index 000000000000..f08aecab60db --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1028/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1028", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1028", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1028/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1028/analyzer.go new file mode 100644 index 000000000000..9567d6fd466d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1028/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1028 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1028" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1029/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1029/BUILD.bazel new file mode 100644 index 000000000000..997a930bedf8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1029/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1029", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1029", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1029/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1029/analyzer.go new file mode 100644 index 000000000000..ff97319c229f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1029/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1029 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1029" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1030/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1030/BUILD.bazel new file mode 100644 index 000000000000..d61906987926 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1030/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1030", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1030", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1030/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1030/analyzer.go new file mode 100644 index 000000000000..e8016cf91395 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1030/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1030 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1030" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1031/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1031/BUILD.bazel new file mode 100644 index 000000000000..836c47a6a109 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1031/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1031", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1031", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1031/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1031/analyzer.go new file mode 100644 index 000000000000..fa3af4766af9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1031/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1031 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1031" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1032/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1032/BUILD.bazel new file mode 100644 index 000000000000..f59d6b589996 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1032/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1032", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1032", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1032/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1032/analyzer.go new file mode 100644 index 000000000000..2f359651c95b --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1032/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1032 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1032" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1033/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1033/BUILD.bazel new file mode 100644 index 000000000000..52efec5656a0 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1033/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1033", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1033", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1033/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1033/analyzer.go new file mode 100644 index 000000000000..2f0800baab06 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1033/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1033 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1033" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1034/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1034/BUILD.bazel new file mode 100644 index 000000000000..894c72d74904 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1034/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1034", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1034", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1034/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1034/analyzer.go new file mode 100644 index 000000000000..ebc6ab9b90d7 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1034/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1034 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1034" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1035/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1035/BUILD.bazel new file mode 100644 index 000000000000..864d0daab96c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1035/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1035", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1035", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1035/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1035/analyzer.go new file mode 100644 index 000000000000..4ebf44dbfb12 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1035/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1035 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1035" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1036/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1036/BUILD.bazel new file mode 100644 index 000000000000..a047a9077d62 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1036/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1036", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1036", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1036/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1036/analyzer.go new file mode 100644 index 000000000000..7c0438b1d3a8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1036/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1036 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1036" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1037/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1037/BUILD.bazel new file mode 100644 index 000000000000..02e43b9ff301 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1037/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1037", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1037", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1037/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1037/analyzer.go new file mode 100644 index 000000000000..b768430aec07 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1037/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1037 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1037" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1038/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1038/BUILD.bazel new file mode 100644 index 000000000000..d1d451c95255 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1038/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1038", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1038", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1038/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1038/analyzer.go new file mode 100644 index 000000000000..5867c44bb258 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1038/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1038 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1038" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1039/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1039/BUILD.bazel new file mode 100644 index 000000000000..752e4d105090 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1039/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1039", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1039", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1039/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1039/analyzer.go new file mode 100644 index 000000000000..2c7bd76b9710 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1039/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1039 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1039" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/s1040/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/s1040/BUILD.bazel new file mode 100644 index 000000000000..6eae37ef0715 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1040/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "s1040", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/s1040", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//simple", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/s1040/analyzer.go b/build/bazelutil/staticcheckanalyzers/s1040/analyzer.go new file mode 100644 index 000000000000..7afad78749e6 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/s1040/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package s1040 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/simple" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range simple.Analyzers { + if analyzer.Analyzer.Name == "S1040" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1000/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1000/BUILD.bazel new file mode 100644 index 000000000000..ec4c15457faa --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1000/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1000", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1000", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1000/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1000/analyzer.go new file mode 100644 index 000000000000..4acf9bc1cce7 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1000/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1000 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1000" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1001/BUILD.bazel new file mode 100644 index 000000000000..757a7842fe1b --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1001/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1001/analyzer.go new file mode 100644 index 000000000000..e0a14fead722 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1002/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1002/BUILD.bazel new file mode 100644 index 000000000000..6fde3e73c46a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1002/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1002", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1002", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1002/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1002/analyzer.go new file mode 100644 index 000000000000..75133d88c83d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1002/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1002 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1002" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1003/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1003/BUILD.bazel new file mode 100644 index 000000000000..e854d6e07aae --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1003/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1003", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1003", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1003/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1003/analyzer.go new file mode 100644 index 000000000000..ea7b45a9c479 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1003/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1003 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1003" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1004/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1004/BUILD.bazel new file mode 100644 index 000000000000..a66ed151d959 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1004/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1004", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1004", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1004/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1004/analyzer.go new file mode 100644 index 000000000000..5b4c2c5a663d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1004/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1004 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1004" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1005/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1005/BUILD.bazel new file mode 100644 index 000000000000..53b6f70199f5 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1005/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1005", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1005", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1005/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1005/analyzer.go new file mode 100644 index 000000000000..703a10d0b49a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1005/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1005 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1005" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1006/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1006/BUILD.bazel new file mode 100644 index 000000000000..fd9d4631e2e4 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1006/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1006", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1006", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1006/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1006/analyzer.go new file mode 100644 index 000000000000..de6cd892f60d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1006/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1006 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1006" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1007/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1007/BUILD.bazel new file mode 100644 index 000000000000..dbafdff204f5 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1007/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1007", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1007", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1007/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1007/analyzer.go new file mode 100644 index 000000000000..dc4130d8a969 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1007/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1007 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1007" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1008/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1008/BUILD.bazel new file mode 100644 index 000000000000..42094c1b8334 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1008/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1008", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1008", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1008/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1008/analyzer.go new file mode 100644 index 000000000000..8e1428e9a0c9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1008/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1008 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1008" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1010/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1010/BUILD.bazel new file mode 100644 index 000000000000..95c5e53a8e18 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1010/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1010", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1010", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1010/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1010/analyzer.go new file mode 100644 index 000000000000..4a4d85230db8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1010/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1010 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1010" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1011/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1011/BUILD.bazel new file mode 100644 index 000000000000..473d8b0391ef --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1011/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1011", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1011", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1011/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1011/analyzer.go new file mode 100644 index 000000000000..9b6bc63c05aa --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1011/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1011 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1011" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1012/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1012/BUILD.bazel new file mode 100644 index 000000000000..9591420a3ca8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1012/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1012", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1012", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1012/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1012/analyzer.go new file mode 100644 index 000000000000..dcd2eb117ed8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1012/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1012 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1012" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1013/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1013/BUILD.bazel new file mode 100644 index 000000000000..05ee93c8a880 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1013/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1013", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1013", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1013/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1013/analyzer.go new file mode 100644 index 000000000000..ea401ef91d81 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1013/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1013 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1013" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1014/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1014/BUILD.bazel new file mode 100644 index 000000000000..2048ba964e90 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1014/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1014", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1014", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1014/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1014/analyzer.go new file mode 100644 index 000000000000..b31355c7838f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1014/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1014 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1014" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1015/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1015/BUILD.bazel new file mode 100644 index 000000000000..34c983041084 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1015/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1015", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1015", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1015/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1015/analyzer.go new file mode 100644 index 000000000000..4ef3aa02cdaf --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1015/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1015 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1015" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1016/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1016/BUILD.bazel new file mode 100644 index 000000000000..dcd76fa89274 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1016/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1016", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1016", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1016/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1016/analyzer.go new file mode 100644 index 000000000000..947d35a221f2 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1016/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1016 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1016" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1017/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1017/BUILD.bazel new file mode 100644 index 000000000000..7e3cbb531e92 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1017/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1017", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1017", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1017/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1017/analyzer.go new file mode 100644 index 000000000000..ca66e3346654 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1017/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1017 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1017" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1018/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1018/BUILD.bazel new file mode 100644 index 000000000000..95f60e904145 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1018/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1018", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1018", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1018/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1018/analyzer.go new file mode 100644 index 000000000000..082baf37f4d9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1018/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1018 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1018" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1019/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1019/BUILD.bazel new file mode 100644 index 000000000000..ce5326e30371 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1019/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1019", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1019", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1019/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1019/analyzer.go new file mode 100644 index 000000000000..6ba7721c784f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1019/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1019 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1019" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1020/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1020/BUILD.bazel new file mode 100644 index 000000000000..b5305d4e9b3a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1020/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1020", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1020", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1020/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1020/analyzer.go new file mode 100644 index 000000000000..d6b2c1cfffbc --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1020/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1020 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1020" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1021/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1021/BUILD.bazel new file mode 100644 index 000000000000..197e010ff31a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1021/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1021", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1021", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1021/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1021/analyzer.go new file mode 100644 index 000000000000..0a570f851886 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1021/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1021 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1021" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1023/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1023/BUILD.bazel new file mode 100644 index 000000000000..483a52f8de41 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1023/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1023", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1023", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1023/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1023/analyzer.go new file mode 100644 index 000000000000..8b2ec5b54e38 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1023/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1023 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1023" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1024/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1024/BUILD.bazel new file mode 100644 index 000000000000..8c5ecdfd9cbb --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1024/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1024", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1024", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1024/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1024/analyzer.go new file mode 100644 index 000000000000..acc052bd6e13 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1024/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1024 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1024" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1025/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1025/BUILD.bazel new file mode 100644 index 000000000000..f73118b9db3c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1025/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1025", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1025", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1025/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1025/analyzer.go new file mode 100644 index 000000000000..32e0649d7378 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1025/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1025 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1025" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1026/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1026/BUILD.bazel new file mode 100644 index 000000000000..c78b97ebfca6 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1026/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1026", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1026", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1026/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1026/analyzer.go new file mode 100644 index 000000000000..c5e696ce6da5 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1026/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1026 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1026" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1027/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1027/BUILD.bazel new file mode 100644 index 000000000000..e6b60d13307e --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1027/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1027", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1027", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1027/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1027/analyzer.go new file mode 100644 index 000000000000..55572d71e325 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1027/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1027 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1027" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1028/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1028/BUILD.bazel new file mode 100644 index 000000000000..edde4ba83779 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1028/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1028", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1028", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1028/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1028/analyzer.go new file mode 100644 index 000000000000..9a23b5c2071d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1028/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1028 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1028" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1029/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1029/BUILD.bazel new file mode 100644 index 000000000000..3f8ec7cc6a3f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1029/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1029", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1029", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1029/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1029/analyzer.go new file mode 100644 index 000000000000..ac55442eb729 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1029/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1029 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1029" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa1030/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa1030/BUILD.bazel new file mode 100644 index 000000000000..9701b3296f9d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1030/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa1030", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa1030", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa1030/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa1030/analyzer.go new file mode 100644 index 000000000000..0e2b99e8b4cd --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa1030/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa1030 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA1030" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa2000/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa2000/BUILD.bazel new file mode 100644 index 000000000000..58bcec68d3a9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa2000/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa2000", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa2000", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa2000/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa2000/analyzer.go new file mode 100644 index 000000000000..f4406584ed96 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa2000/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa2000 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA2000" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa2001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa2001/BUILD.bazel new file mode 100644 index 000000000000..b358613fdc7d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa2001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa2001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa2001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa2001/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa2001/analyzer.go new file mode 100644 index 000000000000..202a9d36887d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa2001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa2001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA2001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa2002/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa2002/BUILD.bazel new file mode 100644 index 000000000000..65e33d0370f7 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa2002/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa2002", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa2002", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa2002/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa2002/analyzer.go new file mode 100644 index 000000000000..25d36638dc13 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa2002/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa2002 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA2002" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa2003/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa2003/BUILD.bazel new file mode 100644 index 000000000000..a105f40c5009 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa2003/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa2003", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa2003", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa2003/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa2003/analyzer.go new file mode 100644 index 000000000000..5665d9f8c589 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa2003/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa2003 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA2003" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa3000/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa3000/BUILD.bazel new file mode 100644 index 000000000000..ec0e785bb4d3 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa3000/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa3000", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa3000", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa3000/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa3000/analyzer.go new file mode 100644 index 000000000000..bc4c3d01cce3 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa3000/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa3000 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA3000" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa3001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa3001/BUILD.bazel new file mode 100644 index 000000000000..9c1af386b583 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa3001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa3001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa3001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa3001/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa3001/analyzer.go new file mode 100644 index 000000000000..6127f07e9b94 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa3001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa3001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA3001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4000/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4000/BUILD.bazel new file mode 100644 index 000000000000..60993906bd3f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4000/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4000", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4000", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4000/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4000/analyzer.go new file mode 100644 index 000000000000..1ab514adefa6 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4000/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4000 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4000" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4001/BUILD.bazel new file mode 100644 index 000000000000..35e7db70a04a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4001/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4001/analyzer.go new file mode 100644 index 000000000000..105b83d45636 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4003/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4003/BUILD.bazel new file mode 100644 index 000000000000..127c3f9b706c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4003/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4003", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4003", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4003/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4003/analyzer.go new file mode 100644 index 000000000000..9115abb4a4c9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4003/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4003 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4003" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4004/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4004/BUILD.bazel new file mode 100644 index 000000000000..684cf396ce8d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4004/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4004", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4004", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4004/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4004/analyzer.go new file mode 100644 index 000000000000..ec53254a17a3 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4004/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4004 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4004" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4005/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4005/BUILD.bazel new file mode 100644 index 000000000000..ea32c507c055 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4005/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4005", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4005", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4005/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4005/analyzer.go new file mode 100644 index 000000000000..161554e3eb95 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4005/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4005 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4005" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4006/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4006/BUILD.bazel new file mode 100644 index 000000000000..a2644ec7db92 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4006/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4006", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4006", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4006/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4006/analyzer.go new file mode 100644 index 000000000000..1d1d731d7330 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4006/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4006 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4006" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4008/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4008/BUILD.bazel new file mode 100644 index 000000000000..5d6b9f2a8dd0 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4008/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4008", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4008", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4008/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4008/analyzer.go new file mode 100644 index 000000000000..e83512b92511 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4008/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4008 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4008" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4009/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4009/BUILD.bazel new file mode 100644 index 000000000000..644a0b1bda72 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4009/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4009", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4009", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4009/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4009/analyzer.go new file mode 100644 index 000000000000..2673353cd397 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4009/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4009 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4009" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4010/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4010/BUILD.bazel new file mode 100644 index 000000000000..5fad734b6f17 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4010/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4010", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4010", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4010/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4010/analyzer.go new file mode 100644 index 000000000000..0b86fe4c1b35 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4010/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4010 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4010" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4011/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4011/BUILD.bazel new file mode 100644 index 000000000000..08ea9aae1d16 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4011/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4011", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4011", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4011/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4011/analyzer.go new file mode 100644 index 000000000000..5680657b9868 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4011/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4011 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4011" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4012/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4012/BUILD.bazel new file mode 100644 index 000000000000..2fa64101635f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4012/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4012", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4012", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4012/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4012/analyzer.go new file mode 100644 index 000000000000..d15203d63261 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4012/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4012 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4012" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4013/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4013/BUILD.bazel new file mode 100644 index 000000000000..12cbe3119a38 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4013/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4013", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4013", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4013/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4013/analyzer.go new file mode 100644 index 000000000000..814b5f01bc9a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4013/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4013 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4013" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4014/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4014/BUILD.bazel new file mode 100644 index 000000000000..dda44a6b23d1 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4014/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4014", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4014", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4014/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4014/analyzer.go new file mode 100644 index 000000000000..9157ecb401d7 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4014/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4014 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4014" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4015/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4015/BUILD.bazel new file mode 100644 index 000000000000..701a6d3f7ced --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4015/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4015", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4015", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4015/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4015/analyzer.go new file mode 100644 index 000000000000..027b4ea93c3f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4015/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4015 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4015" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4016/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4016/BUILD.bazel new file mode 100644 index 000000000000..0eb95bba1f24 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4016/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4016", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4016", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4016/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4016/analyzer.go new file mode 100644 index 000000000000..74837ff4e2ac --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4016/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4016 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4016" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4017/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4017/BUILD.bazel new file mode 100644 index 000000000000..b5b6c1a7f6ce --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4017/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4017", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4017", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4017/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4017/analyzer.go new file mode 100644 index 000000000000..d58c6d9de808 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4017/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4017 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4017" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4018/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4018/BUILD.bazel new file mode 100644 index 000000000000..b01a9dfbc5cc --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4018/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4018", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4018", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4018/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4018/analyzer.go new file mode 100644 index 000000000000..30d2d34669ed --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4018/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4018 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4018" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4019/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4019/BUILD.bazel new file mode 100644 index 000000000000..6b9a3e775e61 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4019/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4019", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4019", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4019/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4019/analyzer.go new file mode 100644 index 000000000000..adf338470cfe --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4019/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4019 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4019" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4020/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4020/BUILD.bazel new file mode 100644 index 000000000000..08676aa28a83 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4020/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4020", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4020", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4020/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4020/analyzer.go new file mode 100644 index 000000000000..71e03f18d51e --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4020/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4020 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4020" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4021/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4021/BUILD.bazel new file mode 100644 index 000000000000..eadd8ad38081 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4021/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4021", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4021", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4021/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4021/analyzer.go new file mode 100644 index 000000000000..cb243bedb81c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4021/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4021 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4021" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4022/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4022/BUILD.bazel new file mode 100644 index 000000000000..4191889382c4 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4022/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4022", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4022", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4022/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4022/analyzer.go new file mode 100644 index 000000000000..8ceda68bfd7e --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4022/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4022 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4022" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4023/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4023/BUILD.bazel new file mode 100644 index 000000000000..5147d9be863d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4023/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4023", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4023", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4023/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4023/analyzer.go new file mode 100644 index 000000000000..c0d08c712cf4 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4023/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4023 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4023" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4024/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4024/BUILD.bazel new file mode 100644 index 000000000000..d2b9232848db --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4024/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4024", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4024", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4024/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4024/analyzer.go new file mode 100644 index 000000000000..441c84857bb9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4024/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4024 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4024" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4025/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4025/BUILD.bazel new file mode 100644 index 000000000000..0313b03a0e1f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4025/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4025", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4025", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4025/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4025/analyzer.go new file mode 100644 index 000000000000..00cbe6e72a2c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4025/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4025 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4025" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4026/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4026/BUILD.bazel new file mode 100644 index 000000000000..5a1128723273 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4026/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4026", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4026", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4026/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4026/analyzer.go new file mode 100644 index 000000000000..59532b1f7fcc --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4026/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4026 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4026" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa4027/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa4027/BUILD.bazel new file mode 100644 index 000000000000..c75477192724 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4027/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa4027", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa4027", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa4027/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa4027/analyzer.go new file mode 100644 index 000000000000..f7228c98dcbf --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa4027/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa4027 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA4027" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5000/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5000/BUILD.bazel new file mode 100644 index 000000000000..9bd11d66c03e --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5000/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5000", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5000", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5000/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5000/analyzer.go new file mode 100644 index 000000000000..a4ab71fc5e6c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5000/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5000 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5000" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5001/BUILD.bazel new file mode 100644 index 000000000000..ce3e4b979fc8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5001/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5001/analyzer.go new file mode 100644 index 000000000000..aa63064b122b --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5002/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5002/BUILD.bazel new file mode 100644 index 000000000000..b06e3a2878d9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5002/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5002", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5002", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5002/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5002/analyzer.go new file mode 100644 index 000000000000..7f0ff01454cf --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5002/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5002 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5002" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5003/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5003/BUILD.bazel new file mode 100644 index 000000000000..7711fa64ce54 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5003/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5003", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5003", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5003/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5003/analyzer.go new file mode 100644 index 000000000000..bed4a625cfcb --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5003/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5003 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5003" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5004/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5004/BUILD.bazel new file mode 100644 index 000000000000..00035e5b6793 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5004/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5004", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5004", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5004/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5004/analyzer.go new file mode 100644 index 000000000000..20b7b80074de --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5004/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5004 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5004" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5005/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5005/BUILD.bazel new file mode 100644 index 000000000000..07b6f9f147cb --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5005/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5005", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5005", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5005/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5005/analyzer.go new file mode 100644 index 000000000000..97ec6ac00393 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5005/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5005 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5005" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5007/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5007/BUILD.bazel new file mode 100644 index 000000000000..4cd2ce90c7da --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5007/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5007", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5007", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5007/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5007/analyzer.go new file mode 100644 index 000000000000..1d7adcd2508b --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5007/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5007 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5007" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5008/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5008/BUILD.bazel new file mode 100644 index 000000000000..fb2f439951fd --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5008/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5008", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5008", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5008/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5008/analyzer.go new file mode 100644 index 000000000000..f8e8af46cfda --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5008/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5008 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5008" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5009/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5009/BUILD.bazel new file mode 100644 index 000000000000..34535fe68c34 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5009/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5009", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5009", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5009/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5009/analyzer.go new file mode 100644 index 000000000000..3bc0b95c36fc --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5009/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5009 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5009" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5010/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5010/BUILD.bazel new file mode 100644 index 000000000000..8f488c21e6f1 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5010/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5010", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5010", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5010/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5010/analyzer.go new file mode 100644 index 000000000000..820333f15957 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5010/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5010 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5010" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5011/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5011/BUILD.bazel new file mode 100644 index 000000000000..43d6d06916b4 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5011/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5011", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5011", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5011/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5011/analyzer.go new file mode 100644 index 000000000000..ca780c70a364 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5011/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5011 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5011" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa5012/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa5012/BUILD.bazel new file mode 100644 index 000000000000..a0a2176b64d8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5012/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa5012", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa5012", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa5012/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa5012/analyzer.go new file mode 100644 index 000000000000..c78d520c3696 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa5012/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa5012 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA5012" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa6000/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa6000/BUILD.bazel new file mode 100644 index 000000000000..6b3ecfd8a0b2 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6000/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa6000", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa6000", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa6000/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa6000/analyzer.go new file mode 100644 index 000000000000..4a9ecf23a703 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6000/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa6000 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA6000" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa6001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa6001/BUILD.bazel new file mode 100644 index 000000000000..639176223763 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa6001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa6001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa6001/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa6001/analyzer.go new file mode 100644 index 000000000000..d0cfc7798348 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa6001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA6001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa6002/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa6002/BUILD.bazel new file mode 100644 index 000000000000..2eb9dc1b6dba --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6002/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa6002", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa6002", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa6002/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa6002/analyzer.go new file mode 100644 index 000000000000..051a222c03f5 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6002/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa6002 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA6002" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa6003/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa6003/BUILD.bazel new file mode 100644 index 000000000000..205909c37885 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6003/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa6003", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa6003", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa6003/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa6003/analyzer.go new file mode 100644 index 000000000000..aec9a5c23582 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6003/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa6003 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA6003" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa6005/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa6005/BUILD.bazel new file mode 100644 index 000000000000..f787eb3c5a14 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6005/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa6005", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa6005", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa6005/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa6005/analyzer.go new file mode 100644 index 000000000000..a2d926d07c03 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa6005/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa6005 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA6005" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa9001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa9001/BUILD.bazel new file mode 100644 index 000000000000..fe11aa9c904c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa9001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa9001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa9001/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa9001/analyzer.go new file mode 100644 index 000000000000..b37c41676a0a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa9001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA9001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa9002/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa9002/BUILD.bazel new file mode 100644 index 000000000000..a53e4656472f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9002/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa9002", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa9002", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa9002/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa9002/analyzer.go new file mode 100644 index 000000000000..e8e47a2459ca --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9002/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa9002 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA9002" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa9003/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa9003/BUILD.bazel new file mode 100644 index 000000000000..115522d025e8 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9003/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa9003", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa9003", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa9003/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa9003/analyzer.go new file mode 100644 index 000000000000..fefe90bcfe50 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9003/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa9003 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA9003" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa9004/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa9004/BUILD.bazel new file mode 100644 index 000000000000..8f5f06130b64 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9004/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa9004", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa9004", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa9004/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa9004/analyzer.go new file mode 100644 index 000000000000..cbc10f953f2d --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9004/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa9004 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA9004" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa9005/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa9005/BUILD.bazel new file mode 100644 index 000000000000..769e66abca0c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9005/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa9005", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa9005", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa9005/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa9005/analyzer.go new file mode 100644 index 000000000000..ff4415e4e09a --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9005/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa9005 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA9005" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/sa9006/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/sa9006/BUILD.bazel new file mode 100644 index 000000000000..46961b271f43 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9006/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "sa9006", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/sa9006", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//staticcheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/sa9006/analyzer.go b/build/bazelutil/staticcheckanalyzers/sa9006/analyzer.go new file mode 100644 index 000000000000..9fb3e7fc64a6 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/sa9006/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package sa9006 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/staticcheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range staticcheck.Analyzers { + if analyzer.Analyzer.Name == "SA9006" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/pkg/cmd/dev/build.go b/pkg/cmd/dev/build.go index 1c8ceb94c247..74085b8bae07 100644 --- a/pkg/cmd/dev/build.go +++ b/pkg/cmd/dev/build.go @@ -84,6 +84,7 @@ var buildTargetMapping = map[string]string{ "roachprod-stress": "//pkg/cmd/roachprod-stress:roachprod-stress", "roachtest": "//pkg/cmd/roachtest:roachtest", "short": "//pkg/cmd/cockroach-short:cockroach-short", + "staticcheck": "@co_honnef_go_tools//cmd/staticcheck:staticcheck", "stress": stressTarget, "workload": "//pkg/cmd/workload:workload", } diff --git a/pkg/cmd/generate-staticcheck/BUILD.bazel b/pkg/cmd/generate-staticcheck/BUILD.bazel new file mode 100644 index 000000000000..785269b5ad27 --- /dev/null +++ b/pkg/cmd/generate-staticcheck/BUILD.bazel @@ -0,0 +1,19 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "generate-staticcheck_lib", + srcs = ["main.go"], + importpath = "github.com/cockroachdb/cockroach/pkg/cmd/generate-staticcheck", + visibility = ["//visibility:private"], + deps = [ + "@co_honnef_go_tools//analysis/lint", + "@co_honnef_go_tools//simple", + "@co_honnef_go_tools//staticcheck", + ], +) + +go_binary( + name = "generate-staticcheck", + embed = [":generate-staticcheck_lib"], + visibility = ["//visibility:public"], +) diff --git a/pkg/cmd/generate-staticcheck/main.go b/pkg/cmd/generate-staticcheck/main.go new file mode 100644 index 000000000000..f8685fc34e05 --- /dev/null +++ b/pkg/cmd/generate-staticcheck/main.go @@ -0,0 +1,129 @@ +// Copyright 2021 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. +package main + +import ( + "io/ioutil" + "os" + "path/filepath" + "sort" + "strings" + "text/template" + + "honnef.co/go/tools/analysis/lint" + "honnef.co/go/tools/simple" + "honnef.co/go/tools/staticcheck" +) + +const ( + readmeContent = `All of the code in this directory is generated by generate-staticcheck for use in Bazel. +` + buildBazelContent = `exports_files(["def.bzl"])` + analysisFileTemplate = `// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package {{ .Package }} + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/{{ .CheckType }}" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range {{ .CheckType }}.Analyzers { + if analyzer.Analyzer.Name == "{{ .Check }}" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} +` + defBzlFileTemplate = `# Code generated by generate-staticcheck; DO NOT EDIT. + +STATICCHECK_CHECKS = [ +{{range $i,$a := .AllAnalyzers}} "{{.}}", +{{end}}] +` +) + +func main() { + fileTpl := template.Must(template.New("source").Parse(analysisFileTemplate)) + rootDir := "build/bazelutil/staticcheckanalyzers" + err := os.RemoveAll(rootDir) + if err != nil { + panic(err) + } + err = os.MkdirAll(rootDir, 0755) + if err != nil { + panic(err) + } + err = ioutil.WriteFile(filepath.Join(rootDir, "README.md"), []byte(readmeContent), 0644) + if err != nil { + panic(err) + } + err = ioutil.WriteFile(filepath.Join(rootDir, "BUILD.bazel"), []byte(buildBazelContent), 0644) + if err != nil { + panic(err) + } + // All of these analyzers will be written to def.bzl. + var allAnalyzers []string + for _, check := range []struct { + Analyzers []*lint.Analyzer + CheckType string + }{ + // TODO: stylecheck? #73568 + // TODO: Consider adding quickfix checks. + {Analyzers: staticcheck.Analyzers, CheckType: "staticcheck"}, + {Analyzers: simple.Analyzers, CheckType: "simple"}, + } { + for _, v := range check.Analyzers { + analyzer := v.Analyzer + pkgname := strings.ToLower(analyzer.Name) + dirname := filepath.Join(rootDir, pkgname) + err := os.MkdirAll(dirname, 0755) + if err != nil { + panic(err) + } + outFile, err := os.Create(filepath.Join(dirname, "analyzer.go")) + if err != nil { + panic(err) + } + err = fileTpl.Execute(outFile, struct { + Package string + Check string + CheckType string + }{Package: pkgname, Check: analyzer.Name, CheckType: check.CheckType}) + if err != nil { + panic(err) + } + err = outFile.Close() + if err != nil { + panic(err) + } + allAnalyzers = append(allAnalyzers, "//"+dirname) + } + } + sort.Strings(allAnalyzers) + fileTpl = template.Must(template.New("defbzl").Parse(defBzlFileTemplate)) + defBzlFile, err := os.Create(filepath.Join(rootDir, "def.bzl")) + if err != nil { + panic(err) + } + err = fileTpl.Execute(defBzlFile, struct{ AllAnalyzers []string }{AllAnalyzers: allAnalyzers}) + if err != nil { + panic(err) + } +} diff --git a/pkg/testutils/lint/lint_test.go b/pkg/testutils/lint/lint_test.go index 5134891ccb39..4d530bd07b0f 100644 --- a/pkg/testutils/lint/lint_test.go +++ b/pkg/testutils/lint/lint_test.go @@ -1680,7 +1680,9 @@ instead. t.Run("TestStaticCheck", func(t *testing.T) { // staticcheck uses 2.4GB of ram (as of 2019-05-10), so don't parallelize it. skip.UnderShort(t) - skip.UnderBazelWithIssue(t, 68496, "A TON of build errors") + if bazel.BuiltWithBazel() { + skip.IgnoreLint(t, "the staticcheck tests are run during the bazel build") + } cmd, stderr, filter, err := dirCmd( crdb.Dir, diff --git a/pkg/testutils/lint/passes/staticcheck/BUILD.bazel b/pkg/testutils/lint/passes/staticcheck/BUILD.bazel new file mode 100644 index 000000000000..6b57842cb1c7 --- /dev/null +++ b/pkg/testutils/lint/passes/staticcheck/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "staticcheck", + srcs = ["staticcheck.go"], + importpath = "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck", + visibility = ["//visibility:public"], + deps = [ + "@co_honnef_go_tools//analysis/facts", + "@co_honnef_go_tools//analysis/lint", + "@co_honnef_go_tools//analysis/report", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/pkg/testutils/lint/passes/staticcheck/staticcheck.go b/pkg/testutils/lint/passes/staticcheck/staticcheck.go new file mode 100644 index 000000000000..3cdc69412e72 --- /dev/null +++ b/pkg/testutils/lint/passes/staticcheck/staticcheck.go @@ -0,0 +1,73 @@ +// Copyright 2020 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +// Package staticcheck provides utilities for consuming `staticcheck` checks in +// `nogo`. +package staticcheck + +import ( + "strings" + + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/analysis/facts" + "honnef.co/go/tools/analysis/lint" + "honnef.co/go/tools/analysis/report" +) + +// MungeAnalyzer updates an Analyzer from `staticcheck` to make it work w/ nogo. +// The staticcheck analyzers don't look at "lint:ignore" directives, so if you +// integrate them into `nogo` unchanged, you'll get spurious build failures for +// issues that are actually explicitly ignored. So for each staticcheck analyzer +// we add `facts.Directives` to the list of dependencies, then cross-check +// each reported diagnostic to make sure it's not ignored before allowing it +// through. +func MungeAnalyzer(analyzer *analysis.Analyzer) { + // Add facts.directives to the list of dependencies for this analyzer. + analyzer.Requires = analyzer.Requires[0:len(analyzer.Requires):len(analyzer.Requires)] + analyzer.Requires = append(analyzer.Requires, facts.Directives) + oldRun := analyzer.Run + analyzer.Run = func(p *analysis.Pass) (interface{}, error) { + pass := *p + oldReport := p.Report + pass.Report = func(diag analysis.Diagnostic) { + dirs := pass.ResultOf[facts.Directives].([]lint.Directive) + for _, dir := range dirs { + cmd := dir.Command + args := dir.Arguments + switch cmd { + case "ignore": + ignorePos := report.DisplayPosition(pass.Fset, dir.Node.Pos()) + nodePos := report.DisplayPosition(pass.Fset, diag.Pos) + if ignorePos.Filename != nodePos.Filename || ignorePos.Line != nodePos.Line { + continue + } + for _, check := range strings.Split(args[0], ",") { + if check == analyzer.Name { + // Skip reporting the diagnostic. + return + } + } + case "file-ignore": + ignorePos := report.DisplayPosition(pass.Fset, dir.Node.Pos()) + nodePos := report.DisplayPosition(pass.Fset, diag.Pos) + if ignorePos.Filename == nodePos.Filename { + // Skip reporting the diagnostic. + return + } + default: + // Unknown directive, ignore + continue + } + } + oldReport(diag) + } + return oldRun(&pass) + } +} diff --git a/pkg/util/log/stderr_redirect_windows.go b/pkg/util/log/stderr_redirect_windows.go index 9861d56addcf..526e555106e4 100644 --- a/pkg/util/log/stderr_redirect_windows.go +++ b/pkg/util/log/stderr_redirect_windows.go @@ -19,10 +19,7 @@ import ( // dupFD is used to initialize OrigStderr (see stderr_redirect.go). func dupFD(fd uintptr) (uintptr, error) { // Adapted from https://github.com/golang/go/blob/go1.8/src/syscall/exec_windows.go#L303. - p, err := windows.GetCurrentProcess() - if err != nil { - return 0, err - } + p := windows.CurrentProcess() var h windows.Handle return uintptr(h), windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, true, windows.DUPLICATE_SAME_ACCESS) } From 575bf18ba1bfb1a11811c32815048b54fcd0ab15 Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Tue, 7 Dec 2021 14:51:38 -0600 Subject: [PATCH 7/7] bazel: add stylecheck analyzers to `nogo` We skip the checks `ST1000`, `ST1003`, `ST1016`, `ST1020`, `ST1021`, and `ST1022` since they're skipped by the default `staticcheck` config, and our codebase has many violations of them. Closes #73568. Release note: None --- build/bazelutil/nogo_config.json | 215 ++++++++++++++++++ build/bazelutil/staticcheckanalyzers/def.bzl | 18 ++ .../staticcheckanalyzers/st1000/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1000/analyzer.go | 24 ++ .../staticcheckanalyzers/st1001/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1001/analyzer.go | 24 ++ .../staticcheckanalyzers/st1003/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1003/analyzer.go | 24 ++ .../staticcheckanalyzers/st1005/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1005/analyzer.go | 24 ++ .../staticcheckanalyzers/st1006/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1006/analyzer.go | 24 ++ .../staticcheckanalyzers/st1008/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1008/analyzer.go | 24 ++ .../staticcheckanalyzers/st1011/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1011/analyzer.go | 24 ++ .../staticcheckanalyzers/st1012/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1012/analyzer.go | 24 ++ .../staticcheckanalyzers/st1013/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1013/analyzer.go | 24 ++ .../staticcheckanalyzers/st1015/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1015/analyzer.go | 24 ++ .../staticcheckanalyzers/st1016/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1016/analyzer.go | 24 ++ .../staticcheckanalyzers/st1017/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1017/analyzer.go | 24 ++ .../staticcheckanalyzers/st1018/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1018/analyzer.go | 24 ++ .../staticcheckanalyzers/st1019/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1019/analyzer.go | 24 ++ .../staticcheckanalyzers/st1020/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1020/analyzer.go | 24 ++ .../staticcheckanalyzers/st1021/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1021/analyzer.go | 24 ++ .../staticcheckanalyzers/st1022/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1022/analyzer.go | 24 ++ .../staticcheckanalyzers/st1023/BUILD.bazel | 13 ++ .../staticcheckanalyzers/st1023/analyzer.go | 24 ++ .../backupccl/split_and_scatter_processor.go | 2 +- pkg/cmd/generate-staticcheck/BUILD.bazel | 1 + pkg/cmd/generate-staticcheck/main.go | 3 +- pkg/cmd/mirror/mirror.go | 2 +- pkg/sql/catalog/tabledesc/index_test.go | 2 +- 43 files changed, 905 insertions(+), 4 deletions(-) create mode 100644 build/bazelutil/staticcheckanalyzers/st1000/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1000/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1001/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1001/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1003/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1003/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1005/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1005/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1006/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1006/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1008/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1008/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1011/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1011/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1012/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1012/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1013/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1013/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1015/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1015/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1016/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1016/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1017/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1017/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1018/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1018/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1019/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1019/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1020/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1020/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1021/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1021/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1022/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1022/analyzer.go create mode 100644 build/bazelutil/staticcheckanalyzers/st1023/BUILD.bazel create mode 100644 build/bazelutil/staticcheckanalyzers/st1023/analyzer.go diff --git a/build/bazelutil/nogo_config.json b/build/bazelutil/nogo_config.json index ee78229a0c30..ac2655b1c036 100644 --- a/build/bazelutil/nogo_config.json +++ b/build/bazelutil/nogo_config.json @@ -1417,6 +1417,221 @@ "github.com/cockroachdb/cockroach/.*$": "first-party code" } }, + "ST1000": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*$": "skipped in default staticcheck config", + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1001": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1003": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*$": "skipped in default staticcheck config", + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1005": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1006": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1008": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1011": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1011": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1012": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1013": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1015": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1016": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*$": "skipped in default staticcheck config", + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1017": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1018": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1019": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1020": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*$": "skipped in default staticcheck config", + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1021": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*$": "skipped in default staticcheck config", + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1022": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*$": "skipped in default staticcheck config", + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, + "ST1023": { + "exclude_files": { + "github.com/cockroachdb/cockroach/.*\\.eg\\.go$": "generated code", + ".*\\.pb\\.go$": "generated code", + ".*\\.pb\\.gw\\.go$": "generated code", + "github.com/cockroachdb/cockroach/.*_generated\\.go$": "generated code" + }, + "only_files": { + "github.com/cockroachdb/cockroach/.*$": "first-party code" + } + }, "stdmethods": { "only_files": { "github.com/cockroachdb/cockroach/.*$": "first-party code" diff --git a/build/bazelutil/staticcheckanalyzers/def.bzl b/build/bazelutil/staticcheckanalyzers/def.bzl index 362e48566fbb..93a5fd8db788 100644 --- a/build/bazelutil/staticcheckanalyzers/def.bzl +++ b/build/bazelutil/staticcheckanalyzers/def.bzl @@ -120,4 +120,22 @@ STATICCHECK_CHECKS = [ "//build/bazelutil/staticcheckanalyzers/sa9004", "//build/bazelutil/staticcheckanalyzers/sa9005", "//build/bazelutil/staticcheckanalyzers/sa9006", + "//build/bazelutil/staticcheckanalyzers/st1000", + "//build/bazelutil/staticcheckanalyzers/st1001", + "//build/bazelutil/staticcheckanalyzers/st1003", + "//build/bazelutil/staticcheckanalyzers/st1005", + "//build/bazelutil/staticcheckanalyzers/st1006", + "//build/bazelutil/staticcheckanalyzers/st1008", + "//build/bazelutil/staticcheckanalyzers/st1011", + "//build/bazelutil/staticcheckanalyzers/st1012", + "//build/bazelutil/staticcheckanalyzers/st1013", + "//build/bazelutil/staticcheckanalyzers/st1015", + "//build/bazelutil/staticcheckanalyzers/st1016", + "//build/bazelutil/staticcheckanalyzers/st1017", + "//build/bazelutil/staticcheckanalyzers/st1018", + "//build/bazelutil/staticcheckanalyzers/st1019", + "//build/bazelutil/staticcheckanalyzers/st1020", + "//build/bazelutil/staticcheckanalyzers/st1021", + "//build/bazelutil/staticcheckanalyzers/st1022", + "//build/bazelutil/staticcheckanalyzers/st1023", ] diff --git a/build/bazelutil/staticcheckanalyzers/st1000/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1000/BUILD.bazel new file mode 100644 index 000000000000..2da5193c6403 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1000/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1000", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1000", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1000/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1000/analyzer.go new file mode 100644 index 000000000000..005195186221 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1000/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1000 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1000" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1001/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1001/BUILD.bazel new file mode 100644 index 000000000000..81b60aa3fcba --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1001/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1001", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1001", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1001/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1001/analyzer.go new file mode 100644 index 000000000000..d9859b37748f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1001/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1001 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1001" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1003/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1003/BUILD.bazel new file mode 100644 index 000000000000..1df4b907b05c --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1003/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1003", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1003", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1003/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1003/analyzer.go new file mode 100644 index 000000000000..534ad2059baa --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1003/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1003 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1003" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1005/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1005/BUILD.bazel new file mode 100644 index 000000000000..8fa410d2f575 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1005/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1005", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1005", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1005/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1005/analyzer.go new file mode 100644 index 000000000000..9d55265197e9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1005/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1005 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1005" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1006/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1006/BUILD.bazel new file mode 100644 index 000000000000..85a8441dfe5f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1006/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1006", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1006", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1006/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1006/analyzer.go new file mode 100644 index 000000000000..3c8cfa9edf55 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1006/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1006 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1006" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1008/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1008/BUILD.bazel new file mode 100644 index 000000000000..89385eaa7d40 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1008/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1008", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1008", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1008/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1008/analyzer.go new file mode 100644 index 000000000000..ce2806148690 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1008/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1008 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1008" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1011/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1011/BUILD.bazel new file mode 100644 index 000000000000..74f4c9409727 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1011/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1011", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1011", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1011/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1011/analyzer.go new file mode 100644 index 000000000000..066d6a83f7e6 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1011/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1011 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1011" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1012/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1012/BUILD.bazel new file mode 100644 index 000000000000..d77b49411815 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1012/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1012", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1012", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1012/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1012/analyzer.go new file mode 100644 index 000000000000..8f9b3808aafa --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1012/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1012 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1012" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1013/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1013/BUILD.bazel new file mode 100644 index 000000000000..f4c920949a2f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1013/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1013", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1013", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1013/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1013/analyzer.go new file mode 100644 index 000000000000..597d377dba68 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1013/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1013 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1013" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1015/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1015/BUILD.bazel new file mode 100644 index 000000000000..fa9fbe0bd605 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1015/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1015", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1015", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1015/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1015/analyzer.go new file mode 100644 index 000000000000..2ce27a1d88da --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1015/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1015 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1015" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1016/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1016/BUILD.bazel new file mode 100644 index 000000000000..50e86f495906 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1016/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1016", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1016", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1016/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1016/analyzer.go new file mode 100644 index 000000000000..4279dd090b6f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1016/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1016 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1016" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1017/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1017/BUILD.bazel new file mode 100644 index 000000000000..3f40a94402fa --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1017/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1017", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1017", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1017/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1017/analyzer.go new file mode 100644 index 000000000000..0cd3c9968ce9 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1017/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1017 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1017" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1018/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1018/BUILD.bazel new file mode 100644 index 000000000000..4295539feb6f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1018/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1018", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1018", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1018/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1018/analyzer.go new file mode 100644 index 000000000000..599e1d1d4421 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1018/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1018 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1018" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1019/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1019/BUILD.bazel new file mode 100644 index 000000000000..a4bba830f9c2 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1019/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1019", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1019", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1019/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1019/analyzer.go new file mode 100644 index 000000000000..fda11d5b3c19 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1019/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1019 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1019" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1020/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1020/BUILD.bazel new file mode 100644 index 000000000000..c8cfbc2c4fd7 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1020/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1020", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1020", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1020/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1020/analyzer.go new file mode 100644 index 000000000000..0c74a3aa82ca --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1020/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1020 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1020" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1021/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1021/BUILD.bazel new file mode 100644 index 000000000000..bc95d6ef1261 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1021/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1021", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1021", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1021/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1021/analyzer.go new file mode 100644 index 000000000000..6db789aebf3f --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1021/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1021 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1021" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1022/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1022/BUILD.bazel new file mode 100644 index 000000000000..877f160de68e --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1022/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1022", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1022", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1022/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1022/analyzer.go new file mode 100644 index 000000000000..4aa982b77672 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1022/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1022 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1022" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/build/bazelutil/staticcheckanalyzers/st1023/BUILD.bazel b/build/bazelutil/staticcheckanalyzers/st1023/BUILD.bazel new file mode 100644 index 000000000000..e89d54e0ca96 --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1023/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "st1023", + srcs = ["analyzer.go"], + importpath = "github.com/cockroachdb/cockroach/build/bazelutil/staticcheckanalyzers/st1023", + visibility = ["//visibility:public"], + deps = [ + "//pkg/testutils/lint/passes/staticcheck", + "@co_honnef_go_tools//stylecheck", + "@org_golang_x_tools//go/analysis", + ], +) diff --git a/build/bazelutil/staticcheckanalyzers/st1023/analyzer.go b/build/bazelutil/staticcheckanalyzers/st1023/analyzer.go new file mode 100644 index 000000000000..e7fa7c4afc6b --- /dev/null +++ b/build/bazelutil/staticcheckanalyzers/st1023/analyzer.go @@ -0,0 +1,24 @@ +// Code generated by generate-staticcheck; DO NOT EDIT. + +//go:build bazel +// +build bazel + +package st1023 + +import ( + util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/staticcheck" + "golang.org/x/tools/go/analysis" + "honnef.co/go/tools/stylecheck" +) + +var Analyzer *analysis.Analyzer + +func init() { + for _, analyzer := range stylecheck.Analyzers { + if analyzer.Analyzer.Name == "ST1023" { + Analyzer = analyzer.Analyzer + break + } + } + util.MungeAnalyzer(Analyzer) +} diff --git a/pkg/ccl/backupccl/split_and_scatter_processor.go b/pkg/ccl/backupccl/split_and_scatter_processor.go index f856dd936452..349278b6e62a 100644 --- a/pkg/ccl/backupccl/split_and_scatter_processor.go +++ b/pkg/ccl/backupccl/split_and_scatter_processor.go @@ -218,7 +218,7 @@ func newSplitAndScatterProcessor( return nil, err } - var scatterer splitAndScatterer = makeSplitAndScatterer(db, kr) + var scatterer = makeSplitAndScatterer(db, kr) if !flowCtx.Cfg.Codec.ForSystemTenant() { scatterer = noopSplitAndScatterer{} } diff --git a/pkg/cmd/generate-staticcheck/BUILD.bazel b/pkg/cmd/generate-staticcheck/BUILD.bazel index 785269b5ad27..3ade80b39e5f 100644 --- a/pkg/cmd/generate-staticcheck/BUILD.bazel +++ b/pkg/cmd/generate-staticcheck/BUILD.bazel @@ -9,6 +9,7 @@ go_library( "@co_honnef_go_tools//analysis/lint", "@co_honnef_go_tools//simple", "@co_honnef_go_tools//staticcheck", + "@co_honnef_go_tools//stylecheck", ], ) diff --git a/pkg/cmd/generate-staticcheck/main.go b/pkg/cmd/generate-staticcheck/main.go index f8685fc34e05..f2f672d134e1 100644 --- a/pkg/cmd/generate-staticcheck/main.go +++ b/pkg/cmd/generate-staticcheck/main.go @@ -20,6 +20,7 @@ import ( "honnef.co/go/tools/analysis/lint" "honnef.co/go/tools/simple" "honnef.co/go/tools/staticcheck" + "honnef.co/go/tools/stylecheck" ) const ( @@ -84,9 +85,9 @@ func main() { Analyzers []*lint.Analyzer CheckType string }{ - // TODO: stylecheck? #73568 // TODO: Consider adding quickfix checks. {Analyzers: staticcheck.Analyzers, CheckType: "staticcheck"}, + {Analyzers: stylecheck.Analyzers, CheckType: "stylecheck"}, {Analyzers: simple.Analyzers, CheckType: "simple"}, } { for _, v := range check.Analyzers { diff --git a/pkg/cmd/mirror/mirror.go b/pkg/cmd/mirror/mirror.go index f5893126490e..4d4852c34118 100644 --- a/pkg/cmd/mirror/mirror.go +++ b/pkg/cmd/mirror/mirror.go @@ -271,7 +271,7 @@ func maybeGetExistingMirror(call *syntax.CallExpr) (string, existingMirror, erro switch bx := arg.(type) { case *syntax.BinaryExpr: if bx.Op != syntax.EQ { - return "", existingMirror{}, fmt.Errorf("Unexpected binary expression Op %d", bx.Op) + return "", existingMirror{}, fmt.Errorf("unexpected binary expression Op %d", bx.Op) } kwarg, err := expectIdent(bx.X) if err != nil { diff --git a/pkg/sql/catalog/tabledesc/index_test.go b/pkg/sql/catalog/tabledesc/index_test.go index 9bf96b5fab7c..f43c1da17c9e 100644 --- a/pkg/sql/catalog/tabledesc/index_test.go +++ b/pkg/sql/catalog/tabledesc/index_test.go @@ -88,7 +88,7 @@ func TestIndexInterface(t *testing.T) { immutable := catalogkv.TestingGetImmutableTableDescriptor(db, keys.SystemSQLCodec, "d", "t") require.NotNil(t, immutable) - var tableI catalog.TableDescriptor = immutable + var tableI = immutable require.NotNil(t, tableI) // Find indexes by name, check that names are correct and that indexes