Skip to content

Commit 1656a4c

Browse files
craig[bot]bghal
andcommitted
Merge #155808
155808: sql: schemachanger doc punctuation r=bghal a=bghal Improves clarity with a few punctuation changes. Epic: CRDB-31283 Informs: #139605 Release note: None Co-authored-by: Brendan Gerrity <brendan.gerrity@cockroachlabs.com>
2 parents bf25721 + 7bc9bb0 commit 1656a4c

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

pkg/sql/schemachanger/doc.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ package schemachanger
1515
// # Similarities and differences with the legacy schema changer
1616
//
1717
// The main challenge that any schema changer in CockroachDB must solve is to
18-
// perform these correctly while maintaining the "online" property: tables must
18+
// perform these correctly while maintaining the "online" property: Tables must
1919
// remain accessible to concurrent queries while they undergo schema changes.
2020
// Online schema changes are enabled by upholding the 2-version invariant, see
2121
// docs/RFCS/20151014_online_schema_change.md for details. This necessarily
@@ -31,15 +31,15 @@ package schemachanger
3131
// nonempty table. However, we want these rollbacks to always succeed.
3232
//
3333
// In CockroachDB, both in the legacy and in the declarative schema changer, for
34-
// schema changes involving more than one transaction. this sequence of
35-
// transactions is driven by a job; of type SCHEMA_CHANGE or
34+
// schema changes involving more than one transaction, this sequence of
35+
// transactions is driven by a job: Of type SCHEMA_CHANGE or
3636
// TYPEDESC_SCHEMA_CHANGE for the legacy schema changer, NEW_SCHEMA_CHANGE for
3737
// the declarative schema changer. In both cases the schema change gets rolled
3838
// back when the job's `Resume` method encounters an error, after which its
3939
// `OnFailOrCancel` method takes over and eventually transitions the job to the
4040
// `failed` terminal state. Both schema changers also have in common the fact
4141
// that they store the current state and targeted end-state of an ongoing schema
42-
// change inside the affected descriptor, but here the similarities end: for the
42+
// change inside the affected descriptor, but here the similarities end: For the
4343
// legacy schema changer, this state is encoded in the descriptor protobuf's
4444
// `mutations` slice; for the declarative schema changer, it's
4545
// `declarative_schema_changer_state`.
@@ -77,16 +77,15 @@ package schemachanger
7777
// # The element model
7878
//
7979
// The declarative schema changer models its persisted state in terms of
80-
// elements, which can be thought of as "things" on which a schema change can be
81-
// performed, typically leaves of a DDL statement's AST: e.g. a table's name is
80+
// elements (which can be thought of as "things" on which a schema change can be
81+
// performed, typically leaves of a DDL statement's AST): e.g. a table's name is
8282
// modeled as an element called TableName, a column's default value expression
8383
// is modelled by ColumnDefaultExpression, and so forth.
8484
//
85-
// A schema change is defined by setting target statuses to a set of
86-
//elements.
87-
// These statuses are PUBLIC, ABSENT or TRANSIENT_ABSENT. This is best described
88-
// by example; `ALTER TABLE foo RENAME COLUMN x TO y`, assuming `foo` has
89-
// descriptor ID 123 and `x` has column ID 4, gets translated into:
85+
// A schema change is defined by setting target statuses to a set of elements.
86+
// These statuses are PUBLIC, ABSENT, or TRANSIENT_ABSENT. This is best
87+
// described by example; `ALTER TABLE foo RENAME COLUMN x TO y`, assuming `foo`
88+
// has descriptor ID 123 and `x` has column ID 4, gets translated into:
9089
// - ColumnName{DescID: 123, ColumnID: 4, Name: x} targets ABSENT,
9190
// - ColumnName{DescID: 123, ColumnID: 4, Name: y} targets PUBLIC.
9291
//

0 commit comments

Comments
 (0)