Ted-Jiang commented on code in PR #2237:
URL: https://github.com/apache/arrow-rs/pull/2237#discussion_r933961877
##########
parquet/src/arrow/array_reader/empty_array.rs:
##########
@@ -54,14 +54,21 @@ impl ArrayReader for EmptyArrayReader {
}
fn next_batch(&mut self, batch_size: usize) -> Result<ArrayRef> {
+ let size = self.read_records(batch_size)?;
+ self.consume_batch(size)
+ }
+
+ fn read_records(&mut self, batch_size: usize) -> Result<usize> {
let len = self.remaining_rows.min(batch_size);
self.remaining_rows -= len;
+ Ok(len)
+ }
+ fn consume_batch(&mut self, batch_size: usize) -> Result<ArrayRef> {
let data = ArrayDataBuilder::new(self.data_type.clone())
- .len(len)
+ .len(batch_size)
Review Comment:
Yes, will add one field in struct 😊
--
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]