Skip to content

Commit

Permalink
Revert "add cold.Index"
Browse files Browse the repository at this point in the history
This reverts commit 5f06c00.
  • Loading branch information
gernest committed Feb 10, 2024
1 parent dc76d40 commit 1778f3f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions segment/cold/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,12 @@ var skipFields = map[string]struct{}{
camel.Case(v1.Filters_Duration.String()): {},
}

type Index struct {
segment.Segment
DiskSize uint64
}

func New(r arrow.Record) (*Index, error) {
func New(r arrow.Record) (segment.Segment, error) {
document := NewRecord(r, func(r arrow.Record, i int) bool {
_, ok := skipFields[r.ColumnName(i)]
return !ok
})
defer document.Release()
seg, size, err := ice.New([]segment.Document{document}, func(s string, i int) float32 { return 0 })
if err != nil {
return nil, err
}
return &Index{Segment: seg, DiskSize: size}, nil
seg, _, err := ice.New([]segment.Document{document}, func(s string, i int) float32 { return 0 })
return seg, err
}

0 comments on commit 1778f3f

Please sign in to comment.