-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-16824: [C++] Migrate VectorKernels to use ExecSpan, split out ChunkedArray execution #13398
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
Changes from all commits
eacedf8
fc2833d
eced32a
9b17a25
82114ad
da66c8c
714c640
7a38d8f
bdfadd3
0310555
450597f
0232cc1
99d8b2f
7ed9868
b20e05d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,6 +151,13 @@ void ArraySpan::SetMembers(const ArrayData& data) { | |
| } | ||
| } | ||
|
|
||
| Type::type type_id = this->type->id(); | ||
| if (data.buffers[0] == nullptr && type_id != Type::NA && | ||
| type_id != Type::SPARSE_UNION && type_id != Type::DENSE_UNION) { | ||
| // This should already be zero but we make for sure | ||
| this->null_count = 0; | ||
| } | ||
|
|
||
| // Makes sure any other buffers are seen as null / non-existent | ||
| for (int i = static_cast<int>(data.buffers.size()); i < 3; ++i) { | ||
| ClearBuffer(i); | ||
|
|
@@ -208,7 +215,6 @@ int64_t ArraySpan::GetNullCount() const { | |
| int GetNumBuffers(const DataType& type) { | ||
| switch (type.id()) { | ||
| case Type::NA: | ||
| return 0; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this correct?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes — if you look at
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I suppose it's like how here we have unions listed with three buffers even though the spec lists only one/two.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that was to avoid breaking compatibility. We noticed too late that this was inconsistent with the format spec. |
||
| case Type::STRUCT: | ||
| case Type::FIXED_SIZE_LIST: | ||
| return 1; | ||
|
|
@@ -232,7 +238,7 @@ int ArraySpan::num_buffers() const { return GetNumBuffers(*this->type); } | |
|
|
||
| std::shared_ptr<ArrayData> ArraySpan::ToArrayData() const { | ||
| auto result = std::make_shared<ArrayData>(this->type->Copy(), this->length, | ||
| kUnknownNullCount, this->offset); | ||
| this->null_count, this->offset); | ||
|
|
||
| for (int i = 0; i < this->num_buffers(); ++i) { | ||
| if (this->buffers[i].owner) { | ||
|
|
||
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.
nit: there's
arrow::internal::HasValidityBitmapinarrow/type.h