Copilot commented on code in PR #50629:
URL: https://github.com/apache/arrow/pull/50629#discussion_r4217660989
##########
cpp/src/parquet/reader_test.cc:
##########
@@ -662,8 +662,11 @@ TEST(TestFileReader, GetRecordReader) {
auto records_read = col_record_reader_->ReadRecords(4);
ASSERT_EQ(records_read, 4);
ASSERT_EQ(4, col_record_reader_->values_written());
- ASSERT_EQ(4, col_record_reader_->levels_position());
- ASSERT_EQ(8, col_record_reader_->levels_written());
+ // Column 0 is a flat optional column, whose record reader decodes
definition levels
+ // straight into the validity bitmap of the records read. It never
materializes
+ // levels, so it reports none.
+ ASSERT_EQ(0, col_record_reader_->levels_position());
+ ASSERT_EQ(0, col_record_reader_->levels_written());
Review Comment:
This reader is created with `group->RecordReader(0)` and therefore uses the
new API's default `allow_levels_optimization = false`. It selects the general
reader, which still materializes definition levels, so these zero-counter
assertions fail; either enable the optimization in this test or retain the old
level expectations.
--
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]