-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[C++] Concatenating a single array is a compaction utility #37878
Comments
IIRC, it's been recommended in mailing list posts whenever the question of copying an array comes up It's also in Spark https://github.com/apache/spark/blob/60d02b444e2225b3afbe4955dabbea505e9f769c/python/pyspark/sql/connect/client/core.py#L1287 |
Some previous discussion on this topic (this issue could be considered as a duplicate of that one if we think we want to add an actual utility, instead of only documenting the concat trick): The workaround of concat_arrays is also mentioned for the bug in pickling serializing the full buffers instead of only the sliced buffers: #26685 |
Well if we haven't already documented concatenation for this purpose, I'd prefer to provide an explicit deep copy utility |
Even if it's not formally documented, it's used by other libraries and has been recommended to users before. I don't think we can change it at this point. |
Sure, but to me it still seems better to alias concatenation of a single array to |
Describe the enhancement requested
Concatenation of a single array can be used (recommended? where?) as a memory compaction utility, since it produces a deep copy of the array. This should be better documented and should be tested, since the hot path of passing a single array through unchanged is tempting. (alternatively, Array::DeepCopy might be provided)
See also discussion in PRs:
Component(s)
C++
The text was updated successfully, but these errors were encountered: