Skip to content

Commit

Permalink
Merge pull request #90161 from mgartner/backport22.2-89938
Browse files Browse the repository at this point in the history
release-22.2: randgen: do not generate partitions with NULL values
  • Loading branch information
mgartner authored Oct 20, 2022
2 parents 23bd112 + ed2c164 commit 764f66d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/sql/randgen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,8 @@ func randIndexTableDefFromCols(
t.Exprs = make([]tree.Expr, prefixLen)
for k := 0; k < prefixLen; k++ {
colType := tree.MustBeStaticallyKnownType(cols[k].Type)
t.Exprs[k] = RandDatum(rng, colType, cols[k].Nullable.Nullability != tree.NotNull)
// TODO(#82774): Allow null values once #82774 is addressed.
t.Exprs[k] = RandDatum(rng, colType, false /* nullOk */)
// Variable expressions are not supported in partitions, and NaN and
// infinity are considered variable expressions, so if one is
// generated then regenerate the value.
Expand Down

0 comments on commit 764f66d

Please sign in to comment.