Skip to content

Commit

Permalink
rebase cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bkietz committed Nov 27, 2023
1 parent 591f163 commit b34ace5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 5 additions & 1 deletion cpp/src/arrow/array/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,11 @@ class NullArrayFactory {
}

Status Visit(const BinaryViewType&) {
out_->buffers.resize(2, *zero_buffer_);
if (presizing_zero_buffer_) {
ZeroBufferMustBeAtLeast(sizeof(BinaryViewType::c_type) * length_);
return Status::OK();
}
out_->buffers = {GetValidityBitmap(), *zero_buffer_};
return Status::OK();
}

Expand Down
9 changes: 2 additions & 7 deletions cpp/src/arrow/array/validate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -759,14 +759,9 @@ struct ValidateArrayImpl {

template <typename ListViewType>
Status ValidateListView(const ListViewType& type) {
const ArrayData& values = *data.child_data[0];
const Status child_valid = RecurseInto(values);
if (!child_valid.ok()) {
return Status::Invalid("List-view child array is invalid: ",
child_valid.ToString());
}
RETURN_NOT_OK(RecurseIntoField(0, "List-view child array"));
// For list-views, sizes are validated together with offsets.
return ValidateOffsetsAndSizes(type, /*offset_limit=*/values.length);
return ValidateOffsetsAndSizes(type, /*offset_limit=*/data.child_data[0]->length);
}

template <typename RunEndCType>
Expand Down

0 comments on commit b34ace5

Please sign in to comment.