feat(execute): allocate memory for string content.#5482
Merged
Conversation
Update the string column builder to account for the memory for the string contents.
mhilton
commented
May 20, 2024
| val = values.NewFloat(b.cols[j].(*floatColumnBuilder).data[row]) | ||
| case flux.TString: | ||
| val = values.NewString(b.cols[j].(*stringColumnBuilder).data[row]) | ||
| // TODO(mhilton): avoid a copy |
Contributor
Author
There was a problem hiding this comment.
It is intended this will be changed in a followup PR.
jeffreyssmith2nd
approved these changes
May 20, 2024
appletreeisyellow
approved these changes
May 20, 2024
Contributor
appletreeisyellow
left a comment
There was a problem hiding this comment.
My understanding is that this PR prepares the way to determine if a column has particularly long strings. Looks good to me! ✅
Comment on lines
+223
to
+231
| // String represents a string stored in some backing byte slice. | ||
| type String struct { | ||
| offset int | ||
| len int | ||
| } | ||
|
|
||
| func (s String) Bytes(buf *arrowmem.Buffer) []byte { | ||
| return buf.Bytes()[s.offset : s.offset+s.len] | ||
| } |
Contributor
There was a problem hiding this comment.
👍 My understanding of this new struct is that it stores the column string size and if a string get too long, we can do something with it
mhilton
added a commit
that referenced
this pull request
Aug 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the string column builder to account for the memory for the string contents. This is part of an effort to reduce the prevelence of OOMs caused by unaccounted memory data See influxdata/idpe#18697.
Checklist
Dear Author 👋, the following checks should be completed (or explicitly dismissed) before merging.
experimental/docs/Spec.mdhas been updatedDear Reviewer(s) 👋, you are responsible (among others) for ensuring the completeness and quality of the above before approval.