yaqi-zhao commented on code in PR #14585:
URL: https://github.com/apache/arrow/pull/14585#discussion_r1048109312
##########
cpp/src/arrow/util/bit_stream_utils.h:
##########
@@ -398,6 +412,27 @@ inline int BitReader::GetBatch(int num_bits, T* v, int
batch_size) {
return batch_size;
}
+#ifdef ARROW_WITH_QPL
+inline bool BitReader::GetBatchWithQpl(int batch_size, qpl_job* job) {
+ if (!job) {
+ return false;
+ }
+ job->param_low = value_offset_;
+ job->param_high = batch_size + value_offset_;
+ job->num_input_elements = batch_size + value_offset_;
+
+ job->next_in_ptr = const_cast<uint8_t*>(buffer_ - 1);
Review Comment:
It will not touch invlalid memory since in function
[DictDecoderImpl::SetData](https://github.com/apache/arrow/blob/f6685371032e933e31d7ae2b156a6385c00d1673/cpp/src/parquet/encoding.cc#L1491),
bit reader buffer was set to<encoded-data> and skip <bit_width>

IAA need a full parquet rle buffer so I `-1` here
##########
cpp/src/arrow/util/bit_stream_utils.h:
##########
@@ -398,6 +412,27 @@ inline int BitReader::GetBatch(int num_bits, T* v, int
batch_size) {
return batch_size;
}
+#ifdef ARROW_WITH_QPL
+inline bool BitReader::GetBatchWithQpl(int batch_size, qpl_job* job) {
+ if (!job) {
+ return false;
+ }
+ job->param_low = value_offset_;
+ job->param_high = batch_size + value_offset_;
+ job->num_input_elements = batch_size + value_offset_;
+
+ job->next_in_ptr = const_cast<uint8_t*>(buffer_ - 1);
Review Comment:
It will not touch invlalid memory since in function
[DictDecoderImpl::SetData](https://github.com/apache/arrow/blob/f6685371032e933e31d7ae2b156a6385c00d1673/cpp/src/parquet/encoding.cc#L1491),
bit reader buffer was set to <encoded-data> and skip <bit_width>

IAA need a full parquet rle buffer so I `-1` here
--
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]