Skip to content

Commit

Permalink
fix(typedef): ValueVariationsNumber returns zero all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kropachev committed Aug 6, 2023
1 parent 7732683 commit 42b56b8
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 42b56b8

Please sign in to comment.