-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-7921: [Go] Add Reset method to various components and clean up comments. #6430
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on JIRA? Then could you also rename pull request title in the following format?
See also: |
Can you please open a JIRA issue for the benefit of our changelog? |
go/arrow/array/string.go
Outdated
@@ -30,7 +30,7 @@ const ( | |||
stringArrayMaximumCapacity = math.MaxInt32 | |||
) | |||
|
|||
// A type which represents an immutable sequence of variable-length UTF-8 strings. | |||
// String is a type which represents an immutable sequence of variable-length UTF-8 strings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// String is a type which represents an immutable sequence of variable-length UTF-8 strings. | |
// String represents an immutable sequence of variable-length UTF-8 strings. |
go/arrow/array/data.go
Outdated
@@ -24,7 +24,7 @@ import ( | |||
"github.com/apache/arrow/go/arrow/memory" | |||
) | |||
|
|||
// A type which represents the memory and metadata for an Arrow array. | |||
// Data is a type which represents the memory and metadata for an Arrow array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Data is a type which represents the memory and metadata for an Arrow array. | |
// Data represents the memory and metadata of an Arrow array. |
also, it would be nice to have a few tests for this new API. |
@sbinet I think I addressed all your feedback. I updated the method strings and added some tests. Not really sure what to do about the mutability thing (I left my thoughts on that) but I don't think it impacts correctness at all and the new methods are mostly optimizations to prevent extra allocations for people who want to eak out some extra perf in the hot path. |
@wesm Opened a ticket! |
The reset method allow the data structures to be re-used so they don't have to be allocated over and over again.