Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed loadstring index #65

Merged
merged 1 commit into from
Jun 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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