From d82cf3854b115612fb59b57e0e9674da17c0eb23 Mon Sep 17 00:00:00 2001 From: Hadrian Reppas Date: Fri, 20 Jun 2025 12:03:41 -0400 Subject: [PATCH] Add comment to RleDecoder::Get --- cpp/src/arrow/util/rle_encoding_internal.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpp/src/arrow/util/rle_encoding_internal.h b/cpp/src/arrow/util/rle_encoding_internal.h index 6f133f15b003..fab8c505120d 100644 --- a/cpp/src/arrow/util/rle_encoding_internal.h +++ b/cpp/src/arrow/util/rle_encoding_internal.h @@ -112,6 +112,12 @@ class RleDecoder { } /// Gets the next value. Returns false if there are no more. + /// + /// NB: Because the encoding only supports literal runs with lengths + /// that are multiples of 8, RleEncoder sometimes pads the end of its + /// input with zeros. Since the encoding does not differentiate between + /// input values and padding, Get() returns true even for these padding + /// values. template bool Get(T* val);