Uh oh!
There was an error while loading. Please reload this page.
GH-46128:[C++] Add CompactArray method to BinaryViewArray types - #46229
GH-46128:[C++] Add CompactArray method to BinaryViewArray types#46229andishgar wants to merge 4 commits into
Conversation
andishgar
commented
May 20, 2025
@pitrou When I suggested adding these methods, I wasn't aware that |
andishgar
commented
May 20, 2025
Another note: #include<iostream>
#include<arrow/api.h>
arrow::Status Run() {
int32_t length = std::numeric_limits<int32_t>::max();
std::string input( length,'a');
arrow::StringViewBuilder builder;
ARROW_RETURN_NOT_OK(builder.Append(input));
ARROW_RETURN_NOT_OK(builder.Append(input));
ARROW_ASSIGN_OR_RAISE(auto result, builder.Finish());
arrow::ArraySpan span(*result->data());
// The following line ends to Capacity errorARROW_RETURN_NOT_OK(builder.AppendArraySlice(span,0,2));
returnarrow::Status::OK();
}
intmain() {
auto status = Run();
if (!status.ok()) {
std::cerr << status.ToString() << std::endl;
}
return0;
}
ErrorCapacity error: BinaryView or StringView elements cannot reference strings larger than 2GB |
pitrou
commented
May 20, 2025
I still think it's a useful utility method to have. cc @bkietz for additional opinions.
I don't think this bug is already reported, so there is no "priority or plan". Can you open a separate issue for it, and perhaps submit a PR if you're motivated? |
andishgar
commented
May 20, 2025
Thank you for your response. Yes, of course |
pitrou
left a comment
There was a problem hiding this comment.
Thanks for posting this PR and sorry for the delay @andishgar . I added some comments below.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
andishgar
commented
Jul 1, 2025
@pitrou Thanks for the review. I’ll look into it and follow up soon. |
@pitrou Another Note |
81d18fc to
419db99Compareandishgar
commented
Jul 15, 2025
@pitrou I’ve applied your suggestion. The changes are ready for review. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
andishgar
commented
Jul 15, 2025
Thank you for your feedback. I will look into this. |
e3ed39e to
53334d5Comparerelocate GetOrCopyNullBitmapBuffer reclocate IntervalMerger to util/interval.h Write tests to cover all branches and lines of Interval Merger
53334d5 to
15698fcCompare@pitrou I applied your suggestions. 1-Regarding this comment, my current algorithm for adding intervals even updates 2- I use a lot of |
Thank you for your contribution. Unfortunately, this pull request has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this PR will be closed in 14 days. Feel free to re-open this if it has been closed in error. If you do not have repository permissions to reopen the PR, please tag a maintainer. |
Rationale for this change
As we discussed here, the following method copies only data that is used in data buffers to a new buffer
What changes are included in this PR?
Add a new method the name of which is
CompactArrayAre these changes tested?
I run the relevant unit tests
Are there any user-facing changes?
Yes, I add
ComapctArraymethod toBinaryViewArrayclass