Skip to content

Commit

Permalink
Merge #124887
Browse files Browse the repository at this point in the history
124887: workload/schemachange: expect incomparable types r=annrpom a=annrpom

This patch ensures that our schemachange workload will
allow for invalid columns of incomparable types to pass the
`rowsSatisfyFkConstraint` check -- as they are expected to
fail later on with a foreign key violation.

Epic: none

Fixes: #124719
Release note: None

Co-authored-by: Annie Pompa <annie@cockroachlabs.com>
  • Loading branch information
craig[bot] and annrpom committed May 31, 2024
2 parents f2e7709 + 0823fda commit 6f79468
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/workload/schemachange/error_screening.go
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,10 @@ SELECT count(*) FROM %s

numJoinRows, err := og.scanInt(ctx, tx, q)
if err != nil {
// UndefinedFunction errors mean that the column type is not comparable.
if pgErr := new(pgconn.PgError); errors.As(err, &pgErr) && pgcode.MakeCode(pgErr.Code) == pgcode.UndefinedFunction {
return false, nil
}
return false, err
}
return numJoinRows == childRows, err
Expand Down

0 comments on commit 6f79468

Please sign in to comment.