@@ -993,24 +993,15 @@ void CheckRoundTrip(const Array& data, int bit_width, bool spaced, int32_t parts
993993 const int data_size = static_cast <int >(data.length ());
994994 const int data_values_count =
995995 static_cast <int >(data.length () - spaced * data.null_count ());
996- // Note: because of the way RleEncoder::CheckBufferFull()
997- // is called, we have to reserve an extra "RleEncoder::MinBufferSize"
998- // bytes. These extra bytes won't be used but not reserving them
999- // would cause the encoder to fail.
1000- const int buffer_size =
1001- static_cast <int >(
1002- ::arrow::util::RleBitPackedEncoder::MaxBufferSize (bit_width, data_values_count) +
1003- ::arrow::util::RleBitPackedEncoder::MinBufferSize(bit_width));
996+ const int buffer_size = static_cast <int >(
997+ ::arrow::util::RleBitPackedEncoder::MaxBufferSize (bit_width, data_values_count) +
998+ ::arrow::util::RleBitPackedEncoder::MinBufferSize(bit_width));
1004999
10051000 ASSERT_GE (parts, 1 );
10061001 ASSERT_LE (parts, data_size);
10071002
1008- ARROW_SCOPED_TRACE (" bit_width = " , bit_width, " , spaced = " , spaced, " , data_size = " , data_size,
1009- " , buffer_size = " , buffer_size);
1010- ARROW_LOG (INFO) << " bit_width = " <<bit_width << " , data_size = " << data_size
1011- << " , buffer size = " << buffer_size
1012- << " , min buffer size = " << RleBitPackedEncoder::MinBufferSize (bit_width);
1013-
1003+ ARROW_SCOPED_TRACE (" bit_width = " , bit_width, " , spaced = " , spaced,
1004+ " , data_size = " , data_size, " , buffer_size = " , buffer_size);
10141005 const value_type* data_values = static_cast <const ArrayType&>(data).raw_values ();
10151006
10161007 // Encode the data into `buffer` using the encoder.
@@ -1021,15 +1012,14 @@ void CheckRoundTrip(const Array& data, int bit_width, bool spaced, int32_t parts
10211012 // Depending on `spaced` we treat nulls as regular values.
10221013 if (data.IsValid (i) || !spaced) {
10231014 bool success = encoder.Put (static_cast <uint64_t >(data_values[i]));
1024- ASSERT_TRUE (success) << " Encoding failed in pos " << i << " , current encoder len: " << encoder.len ();
1015+ ASSERT_TRUE (success) << " Encoding failed in pos " << i
1016+ << " , current encoder len: " << encoder.len ();
10251017 ++encoded_values_size;
10261018 }
10271019 }
10281020 int encoded_byte_size = encoder.Flush ();
10291021 ASSERT_EQ (encoded_values_size, data_values_count)
10301022 << " All values input were not encoded successfully by the encoder" ;
1031- // ARROW_LOG(INFO) << "bit_width = " <<bit_width << ", data_size = " << data_size
1032- // << ", buffer size = " << buffer_size << ", encoded_byte_size = " << encoded_byte_size;
10331023
10341024 // Now we verify batch read
10351025 RleBitPackedDecoder<value_type> decoder (buffer.data (), encoded_byte_size, bit_width);
0 commit comments