Skip to content

Commit 0c01ef8

Browse files
committed
Undo debug additions
1 parent d5d4af2 commit 0c01ef8

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
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: OFF
46+
ARROW_DATASET: ON
4747
ARROW_FLIGHT: OFF
4848
ARROW_HDFS: ON
4949
ARROW_HOME: /usr
5050
ARROW_JEMALLOC: OFF
5151
ARROW_MIMALLOC: ON
52-
ARROW_ORC: OFF
53-
ARROW_PARQUET: OFF
52+
ARROW_ORC: ON
53+
ARROW_PARQUET: ON
5454
ARROW_SIMD_LEVEL: ${{ inputs.simd-level }}
55-
ARROW_SUBSTRAIT: OFF
55+
ARROW_SUBSTRAIT: ON
5656
ARROW_USE_GLOG: OFF
5757
ARROW_VERBOSE_THIRDPARTY_BUILD: OFF
5858
ARROW_WITH_BROTLI: OFF

cpp/src/arrow/util/rle_encoding_internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,10 @@ class RleBitPackedEncoder {
532532
}
533533

534534
/// Returns the maximum byte size it could take to encode 'num_values'.
535+
///
536+
/// Note: because of the way CheckBufferFull() is called, you have to
537+
/// reserve an extra "RleEncoder::MinBufferSize" bytes. These extra bytes
538+
/// won't be used but not reserving them can cause the encoder to fail.
535539
static int64_t MaxBufferSize(int bit_width, int64_t num_values) {
536540
// For a bit_width > 1, the worst case is the repetition of "literal run of length 8
537541
// and then a repeated run of length 8".

cpp/src/arrow/util/rle_encoding_test.cc

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)