mapleFU commented on code in PR #38158:
URL: https://github.com/apache/arrow/pull/38158#discussion_r1350521129


##########
cpp/src/parquet/encoding.cc:
##########
@@ -1156,16 +1160,21 @@ inline int PlainBooleanDecoder::DecodeArrow(
 
 int PlainBooleanDecoder::Decode(uint8_t* buffer, int max_values) {
   max_values = std::min(max_values, num_values_);
-  bool val;
+  constexpr int kBatchSize = 1024;
+  std::array<bool, kBatchSize> bit_read_scratch;
   ::arrow::internal::BitmapWriter bit_writer(buffer, 0, max_values);

Review Comment:
   In fact I don't know the differences between bitWriter and 
`FirstTimeBitWriter`... Would the later one be better? 🤔



##########
cpp/src/parquet/encoding.cc:
##########
@@ -1156,16 +1160,21 @@ inline int PlainBooleanDecoder::DecodeArrow(
 
 int PlainBooleanDecoder::Decode(uint8_t* buffer, int max_values) {
   max_values = std::min(max_values, num_values_);
-  bool val;
+  constexpr int kBatchSize = 1024;
+  std::array<bool, kBatchSize> bit_read_scratch;
   ::arrow::internal::BitmapWriter bit_writer(buffer, 0, max_values);

Review Comment:
   In fact I don't know the differences between bitWriter and 
`FirstTimeBitWriter`... Would the later one be better? 🤔



-- 
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