Skip to content

Commit

Permalink
Fixed loadstring index (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelindar authored Jun 4, 2022
1 parent a4a4570 commit f0f0a95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion column_numeric.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ func (s numericReader[T]) Get() (T, bool) {

// Sum computes the sum of the column values selected by the transaction
func (s numericReader[T]) Sum() (r T) {
s.txn.initialize()
s.txn.Range(func(idx uint32) {
v, _ := s.Get()
r += v
Expand Down
2 changes: 1 addition & 1 deletion column_strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (c *columnEnum) LoadString(idx uint32) (v string, ok bool) {
chunk := commit.ChunkAt(idx)
index := idx - chunk.Min()
if int(chunk) < len(c.chunks) && c.chunks[chunk].fill.Contains(index) {
v, ok = c.readAt(c.chunks[chunk].data[idx]), true
v, ok = c.readAt(c.chunks[chunk].data[index]), true
}
return
}
Expand Down

0 comments on commit f0f0a95

Please sign in to comment.