ranflarion commented on code in PR #12523:
URL: https://github.com/apache/arrow-rs/pull/12523#discussion_r4809866861
##########
parquet/src/arrow/push_decoder/mod.rs:
##########
@@ -1061,6 +1061,41 @@ mod test {
assert_eq!(all_output, *TEST_BATCH);
}
+ /// A row group with fewer rows than the batch size is read into buffers
sized for its rows
+ #[test]
+ fn test_decoder_sizes_buffers_for_row_group_rows() {
+ let mut decoder = prefetched_decoder(TEST_BATCH.num_rows());
+
+ let batch = expect_data(decoder.try_decode());
+ assert_eq!(batch.num_rows(), 200);
+ let values = batch.column(0).as_primitive::<Int64Type>().values();
+ assert_eq!(values.inner().capacity(), 200 * size_of::<i64>());
Review Comment:
changed both to `capacity < TEST_BATCH.num_rows() * size_of::<i64>()`, they
still fail with the cap in `next_row_group` reverted.
--
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]