2727#include " arrow/array.h"
2828#include " arrow/array/concatenate.h"
2929#include " arrow/array/util.h"
30+ #include " arrow/pretty_print.h"
3031#include " arrow/scalar.h"
3132#include " arrow/testing/gtest_util.h"
3233#include " arrow/testing/random.h"
@@ -998,6 +999,14 @@ void CheckRoundTrip(const Array& data, int bit_width, bool spaced, int32_t parts
998999 ASSERT_GE (parts, 1 );
9991000 ASSERT_LE (parts, data_size);
10001001
1002+ ARROW_SCOPED_TRACE (" bit_width = " , bit_width, " , spaced = " , spaced, " , data_size = " , data_size,
1003+ " , buffer_size = " , buffer_size);
1004+ PrettyPrintOptions pp_options;
1005+ pp_options.window = 100 ;
1006+ std::string array_repr;
1007+ ASSERT_OK (PrettyPrint (data, pp_options, &array_repr));
1008+ ARROW_LOG (INFO) << " data = " << array_repr;
1009+
10011010 const value_type* data_values = static_cast <const ArrayType&>(data).raw_values ();
10021011
10031012 // Encode the data into `buffer` using the encoder.
@@ -1008,13 +1017,15 @@ void CheckRoundTrip(const Array& data, int bit_width, bool spaced, int32_t parts
10081017 // Depending on `spaced` we treat nulls as regular values.
10091018 if (data.IsValid (i) || !spaced) {
10101019 bool success = encoder.Put (static_cast <uint64_t >(data_values[i]));
1011- ASSERT_TRUE (success) << " Encoding failed in pos " << i;
1020+ ASSERT_TRUE (success) << " Encoding failed in pos " << i << " , current encoder len: " << encoder. len () ;
10121021 ++encoded_values_size;
10131022 }
10141023 }
10151024 int encoded_byte_size = encoder.Flush ();
10161025 ASSERT_EQ (encoded_values_size, data_values_count)
10171026 << " All values input were not encoded successfully by the encoder" ;
1027+ ARROW_LOG (INFO) << " bit_width = " <<bit_width << " , data_size = " << data_size
1028+ << " , buffer size = " << buffer_size << " , encoded_byte_size = " << encoded_byte_size;
10181029
10191030 // Now we verify batch read
10201031 RleBitPackedDecoder<value_type> decoder (buffer.data (), encoded_byte_size, bit_width);
0 commit comments