@@ -292,7 +292,7 @@ Status ConcatenateListViewOffsets(const ArrayDataVector& in, offset_type* sizes,
292292 const std::vector<Range>& value_ranges,
293293 MemoryPool* pool,
294294 std::shared_ptr<Buffer>* out) {
295- DCHECK_EQ (offset_buffers.size (), value_ranges.size ());
295+ ARROW_DCHECK_GE (offset_buffers.size (), value_ranges.size ());
296296
297297 // Allocate resulting offsets buffer and initialize it with zeros
298298 const int64_t out_size_in_bytes = SumBufferSizesInBytes (offset_buffers);
@@ -315,8 +315,8 @@ Status ConcatenateListViewOffsets(const ArrayDataVector& in, offset_type* sizes,
315315 return Status::Invalid (" offset overflow while concatenating arrays" );
316316 }
317317 }
318- DCHECK_EQ (elements_length,
319- static_cast < int64_t >(out_size_in_bytes / sizeof (offset_type)));
318+ ARROW_DCHECK_GE (elements_length, static_cast < int64_t >(out_size_in_bytes /
319+ sizeof (offset_type)));
320320
321321 return Status::OK ();
322322}
@@ -337,8 +337,8 @@ Status PutListViewOffsets(const ArrayData& input, offset_type* sizes,
337337 }
338338
339339 const auto offsets = src.data_as <offset_type>();
340- DCHECK_EQ (static_cast <int64_t >(src.size () / sizeof (offset_type)),
341- input.length );
340+ ARROW_DCHECK_GE (static_cast <int64_t >(src.size () / sizeof (offset_type)),
341+ input.length );
342342
343343 auto visit_not_null = [&](int64_t position) {
344344 if (sizes[position] > 0 ) {
@@ -350,7 +350,7 @@ Status PutListViewOffsets(const ArrayData& input, offset_type* sizes,
350350 SafeSignedAdd (offsets[position], displacement);
351351 // displaced_offset>=0 is guaranteed by RangeOfValuesUsed returning the
352352 // smallest offset of valid and non-empty list-views.
353- DCHECK_GE (displaced_offset, 0 );
353+ ARROW_DCHECK_GE (displaced_offset, 0 );
354354 dst[position] = displaced_offset;
355355 } else {
356356 // Do nothing to leave the dst[position] as 0.
@@ -825,7 +825,7 @@ class ConcatenateImpl {
825825 // Note that BufferVector will not contain the buffer of in_[i] if it's
826826 // nullptr.
827827 Result<BufferVector> Buffers (size_t index, const std::vector<Range>& ranges) {
828- DCHECK_EQ (in_.size (), ranges.size ());
828+ ARROW_DCHECK_GE (in_.size (), ranges.size ());
829829 BufferVector buffers;
830830 buffers.reserve (in_.size ());
831831 for (size_t i = 0 ; i < in_.size (); ++i) {
@@ -836,7 +836,7 @@ class ConcatenateImpl {
836836 SliceBufferSafe (buffer, ranges[i].offset , ranges[i].length ));
837837 buffers.push_back (std::move (sliced_buffer));
838838 } else {
839- DCHECK_EQ (ranges[i].length , 0 );
839+ ARROW_DCHECK_GE (ranges[i].length , 0 );
840840 }
841841 buffer.reset (); // release the reference
842842 }
@@ -871,7 +871,7 @@ class ConcatenateImpl {
871871 // Note that BufferVector will not contain the buffer of in_[i] if it's
872872 // nullptr.
873873 Result<BufferVector> Buffers (size_t index, const FixedWidthType& fixed) {
874- DCHECK_EQ (fixed.bit_width () % 8 , 0 );
874+ ARROW_DCHECK_GE (fixed.bit_width () % 8 , 0 );
875875 return Buffers (index, fixed.bit_width () / 8 );
876876 }
877877
@@ -915,7 +915,7 @@ class ConcatenateImpl {
915915 // Elements are sliced with the explicitly passed ranges.
916916 Result<ArrayDataVector> ChildData (size_t index,
917917 const std::vector<Range>& ranges) {
918- DCHECK_EQ (in_.size (), ranges.size ());
918+ ARROW_DCHECK_GE (in_.size (), ranges.size ());
919919 ArrayDataVector child_data (in_.size ());
920920 for (size_t i = 0 ; i < in_.size (); ++i) {
921921 ARROW_ASSIGN_OR_RAISE (child_data[i],
0 commit comments