Skip to content

Commit

Permalink
fix(proto): handle index out of range in low cardinality
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Jun 14, 2022
1 parent 56f0ebd commit fe50213
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proto/col_low_cardinality.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ func (c *ColLowCardinality[T]) DecodeColumn(r *Reader, rows int) error {

c.Values = c.Values[:0]
for _, idx := range c.keys {
if int64(idx) >= indexRows {
return errors.Errorf("key index out of range [%d] with length %d", idx, indexRows)
}
c.Values = append(c.Values, c.index.Row(idx))
}

Expand Down

0 comments on commit fe50213

Please sign in to comment.