Skip to content

Commit

Permalink
schema: skip secondary indexes for durations
Browse files Browse the repository at this point in the history
We simply skip schema index generation for durations and
the indexes will not be used for either creation or selection.
  • Loading branch information
Henrik Johansson committed Apr 12, 2019
1 parent 8fd2a25 commit c622f35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ func GenSchema() *Schema {
if numColumns > 0 {
numIndexes := rand.Intn(numColumns)
for i := 0; i < numIndexes; i++ {
if columns[i].Type == TYPE_DURATION {
continue
}
indexes = append(indexes, IndexDef{Name: genIndexName("col", i), Column: columns[i]})
}
}
Expand Down

0 comments on commit c622f35

Please sign in to comment.