Skip to content

Commit d5d4af2

Browse files
committed
Add debug for Windows failures
1 parent faa36de commit d5d4af2

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.github/workflows/cpp_windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ jobs:
4343
ARROW_BUILD_SHARED: ON
4444
ARROW_BUILD_STATIC: OFF
4545
ARROW_BUILD_TESTS: ON
46-
ARROW_DATASET: ON
46+
ARROW_DATASET: OFF
4747
ARROW_FLIGHT: OFF
4848
ARROW_HDFS: ON
4949
ARROW_HOME: /usr
5050
ARROW_JEMALLOC: OFF
5151
ARROW_MIMALLOC: ON
52-
ARROW_ORC: ON
53-
ARROW_PARQUET: ON
52+
ARROW_ORC: OFF
53+
ARROW_PARQUET: OFF
5454
ARROW_SIMD_LEVEL: ${{ inputs.simd-level }}
55-
ARROW_SUBSTRAIT: ON
55+
ARROW_SUBSTRAIT: OFF
5656
ARROW_USE_GLOG: OFF
5757
ARROW_VERBOSE_THIRDPARTY_BUILD: OFF
5858
ARROW_WITH_BROTLI: OFF

cpp/src/arrow/util/rle_encoding_test.cc

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,24 @@ 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.
9961000
const int buffer_size =
997-
static_cast<int>(RleBitPackedEncoder::MaxBufferSize(bit_width, data_size));
1001+
static_cast<int>(
1002+
::arrow::util::RleBitPackedEncoder::MaxBufferSize(bit_width, data_values_count) +
1003+
::arrow::util::RleBitPackedEncoder::MinBufferSize(bit_width));
1004+
9981005
ASSERT_GE(parts, 1);
9991006
ASSERT_LE(parts, data_size);
10001007

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+
10011014
const value_type* data_values = static_cast<const ArrayType&>(data).raw_values();
10021015

10031016
// Encode the data into `buffer` using the encoder.
@@ -1008,13 +1021,15 @@ void CheckRoundTrip(const Array& data, int bit_width, bool spaced, int32_t parts
10081021
// Depending on `spaced` we treat nulls as regular values.
10091022
if (data.IsValid(i) || !spaced) {
10101023
bool success = encoder.Put(static_cast<uint64_t>(data_values[i]));
1011-
ASSERT_TRUE(success) << "Encoding failed in pos " << i;
1024+
ASSERT_TRUE(success) << "Encoding failed in pos " << i << ", current encoder len: " << encoder.len();
10121025
++encoded_values_size;
10131026
}
10141027
}
10151028
int encoded_byte_size = encoder.Flush();
10161029
ASSERT_EQ(encoded_values_size, data_values_count)
10171030
<< "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;
10181033

10191034
// Now we verify batch read
10201035
RleBitPackedDecoder<value_type> decoder(buffer.data(), encoded_byte_size, bit_width);

0 commit comments

Comments
 (0)