pitrou commented on code in PR #50629:
URL: https://github.com/apache/arrow/pull/50629#discussion_r3656474359


##########
cpp/src/parquet/column_reader.cc:
##########
@@ -222,6 +254,161 @@ auto LevelDecoder::CountUpTo(int16_t value, int 
batch_size) -> CountUpToResult {
   };
 }
 
+/**************************
+ *  LevelToBitmapDecoder  *
+ **************************/
+
+/// Decoder for definition levels that writes directly into a validity bitmap.
+///
+/// This is the bitmap counterpart of ``LevelDecoder``, specialized for levels
+/// encoded on a single bit (a max level of 1), such as the definition levels 
of a
+/// flat, nullable column. Rather than decoding into an ``int16_t`` array and
+/// re-encoding into an Arrow validity bitmap, it decodes straight into the 
bitmap.
+///
+/// @see LevelDecoder
+class LevelToBitmapDecoder {

Review Comment:
   > The issue is that `Decode` takes fundamentally different arguments:
   >     * In the general case, an `int16_t*` array where the data type 
correspond to one value
   >     * In the bitmap case, a `uint8_t*`array + bit offset to find the exact 
pointed bit.
   
   Ideally the RecordReader would not see levels values anymore, so this 
discrepancy would disappear.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to