Skip to content

Commit

Permalink
*: very minor changes to comments, function locations, and code
Browse files Browse the repository at this point in the history
1. changed one comment;
2. changed one function locaiton in file to be more consistent;
3. added a code change that is consistent with the error message
but won't affect correctness.

Release justification:
  • Loading branch information
Xiang-Gu committed Sep 6, 2022
1 parent af1a53a commit 676d4a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions pkg/sql/schemachanger/rel/schema_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ func (sc *Schema) DefNotJoin1(name string, a Var, def func(a Var) Clauses) Rule1
return sc.rule(name, notJoin, def, a).(Rule1)
}

// DefNotJoin2 defines a not-join rule with two bound variable arguments.
func (sc *Schema) DefNotJoin2(name string, a, b Var, def func(a, b Var) Clauses) Rule2 {
return sc.rule(name, notJoin, def, a, b).(Rule2)
}

// Def2 defines a Rule2.
func (sc *Schema) Def2(name string, a, b Var, def func(a, b Var) Clauses) Rule2 {
return sc.rule(name, regular, def, a, b).(Rule2)
}

// DefNotJoin2 defines a not-join rule with two bound variable arguments.
func (sc *Schema) DefNotJoin2(name string, a, b Var, def func(a, b Var) Clauses) Rule2 {
return sc.rule(name, notJoin, def, a, b).(Rule2)
}

// Def3 defines a Rule3.
func (sc *Schema) Def3(name string, a, b, c Var, def func(a, b, c Var) Clauses) Rule3 {
return sc.rule(name, regular, def, a, b, c).(Rule3)
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/schemachanger/scplan/internal/opgen/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ func validateTargets(targets []target) error {
}

for s := range allStatuses {
if !absentStatuses[s] {
if nonAbsentStatuses[s] && !absentStatuses[s] {
return errors.Errorf("status %s is featured in non-ABSENT targets but not in the ABSENT target", s)
}
if !nonAbsentStatuses[s] {
if absentStatuses[s] && !nonAbsentStatuses[s] {
return errors.Errorf("status %s is featured in ABSENT target but not in any non-ABSENT targets", s)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/schemachanger/scplan/internal/scgraph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/cockroachdb/redact"
)

// Graph is a graph whose nodes are *scpb.Nodes. Graphs are constructed during
// Graph is a graph whose nodes are *screl.Nodes. Graphs are constructed during
// schema change planning. Edges in the graph represent dependencies between
// nodes, either due to the sequencing of statuses for a single target or due to
// inter-target dependencies between statuses.
Expand Down

0 comments on commit 676d4a9

Please sign in to comment.