Skip to content

Commit 3573f54

Browse files
apacheGH-46094: [C++][Docs] Add note to RleDecoder::Get's doc comment (apache#46874)
### Rationale for this change The behavior of `RleDecoder::Get` caused some confusion in apache#46094. ### What changes are included in this PR? Improvement to `RleDecoder::Get`'s doc comment. ### Are these changes tested? N/A ### Are there any user-facing changes? No. * GitHub Issue: apache#46094 Authored-by: Hadrian Reppas <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 118ca35 commit 3573f54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cpp/src/arrow/util/rle_encoding_internal.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ class RleDecoder {
112112
}
113113

114114
/// Gets the next value. Returns false if there are no more.
115+
///
116+
/// NB: Because the encoding only supports literal runs with lengths
117+
/// that are multiples of 8, RleEncoder sometimes pads the end of its
118+
/// input with zeros. Since the encoding does not differentiate between
119+
/// input values and padding, Get() returns true even for these padding
120+
/// values.
115121
template <typename T>
116122
bool Get(T* val);
117123

0 commit comments

Comments
 (0)