Skip to content

Commit

Permalink
Merge pull request #402 from scylladb/401-after-v187-it-hungs-without…
Browse files Browse the repository at this point in the history
…-schema-seed

fix(typedef): ValueVariationsNumber returns zero all the time
  • Loading branch information
dkropachev authored Aug 6, 2023
2 parents 7732683 + 42b56b8 commit edb34a9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/typedef/columns.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (c Columns) NonCounters() Columns {

// ValueVariationsNumber returns number of bytes generated value holds
func (c Columns) ValueVariationsNumber(p *PartitionRangeConfig) float64 {
var out float64
out := float64(1)
for _, col := range c {
out *= col.Type.ValueVariationsNumber(p)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/typedef/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (l Types) LenValue() int {
}

func (l Types) ValueVariationsNumber(p *PartitionRangeConfig) float64 {
var out float64
out := float64(1)
for _, t := range l {
out *= t.ValueVariationsNumber(p)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/typedef/tuple.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (t *TupleType) LenValue() int {

// ValueVariationsNumber returns number of bytes generated value holds
func (t *TupleType) ValueVariationsNumber(p *PartitionRangeConfig) float64 {
var out float64
out := float64(1)
for _, tp := range t.ValueTypes {
out *= out * tp.ValueVariationsNumber(p)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/typedef/udt.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (t *UDTType) LenValue() int {

// ValueVariationsNumber returns number of bytes generated value holds
func (t *UDTType) ValueVariationsNumber(p *PartitionRangeConfig) float64 {
var out float64
out := float64(1)
for _, tp := range t.ValueTypes {
out *= tp.ValueVariationsNumber(p)
}
Expand Down

0 comments on commit edb34a9

Please sign in to comment.